Highlight Code Syntax in WordPress Tips

To high-light the syntax in WordPress, install WP-Syntax and wrap code blocks with

<pre lang="LANGUAGE" line="1"> and</pre>, where LANGUAGE is

  • A: abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, avisynth,
  • B: bash, bf, bibtex, blitzbasic, bnf, boo,
  • C: c, c_mac, caddcl, cadlisp, cil, cfdg, cfm, cmake, cobol, cpp-qt, cpp,csharp,css,
  • D: d, dcs, delphi, diff, div, dos, dot,
  • E: eiffel, email, erlang,
  • F: fo, fortran, freebasic,
  • G: genero, gettext, glsl, gml, gnuplot, groovy,
  • H: haskell, hq9plus, html4strict,
  • I: idl, ini, inno, intercal, io,
  • J: java,java5,javascript,
  • K: kixtart, klonec, klonecpp,
  • L: latex, lisp, locobasic, lolcode lotusformulas, lotusscript, lscript, lsl2, lua,
  • M: m68k, make, matlab, mirc, modula3, mpasm, mxml, mysql,
  • N: nsis,
  • O: oberon2, objc, ocaml-brief, ocaml, oobas, oracle11, oracle8,
  • P: pascal, per, pic16, pixelbender, perl, php-brief, php, plsql, povray, powershell, progress, prolog, properties, providex, python,
  • Q: qbasic,
  • R: rails, rebol, reg, robots, ruby,
  • S: sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql,
  • T: tcl, teraterm, text, thinbasic, tsql, typoscript,
  • V: vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog,
  • W: whitespace, whois, winbatch,
  • X: xml, xorg_conf, xpp,
  • Z: z80

For more info, check out more usage info.

Then copy this following code to your template/index.html file

import os
import re
import time
import sys

lifeline = re.compile(r"(\d) received")
report = ("No response","Partial Response","Alive")

print time.ctime()

for host in range(60,70):
   ip = "192.168.200."+str(host)
   pingaling = os.popen("ping -q -c2 "+ip,"r")
   print "Testing ",ip,
   sys.stdout.flush()
   while 1:
      line = pingaling.readline()
      if not line: break
      igot = re.findall(lifeline,line)
      if igot:
           print report[int(igot[0])]

print time.ctime()
-(void)setEditing:(BOOL)editing animated:(BOOL) animated {
    [ super setEditing:editing animated:animated];
    [ tableView setEditing:editing animated:animated];
    [ tableView reloadData];
}

17 Comments

  1. I’ve recently started a weblog, the information you present on this site has helped me tremendously. Thank you for your whole time & work.

  2. This article was really good. I look forward to reading another one.

  3. Nice! Just wanted to respond. I thoroughly loved your post. Keep up the great work.

  4. I’m sure you will find there’s trouble with your internet site by using Firefox browser.

  5. This is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. I truly loved reading your posts on shallwelearn.com . Thanks!

  6. Valuable information. Lucky me I found your website by accident, and I’m shocked why this accident did not happened earlier! I bookmarked it.

  7. Pero quiero decirles que este shallwelearn.com es de gran ayuda, gracias por tomarse el tiempo para escribir esto.

  8. Hello there! Do you know if they make any plugins to safeguard against hackers? I’m kinda paranoid about losing everything I’ve worked hard on. Any suggestions?

  9. Hello.This article was really remarkable, especially because I was looking for thoughts on this subject last couple of days.

  10. I’m extremely impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you customize it yourself? Either way keep up the excellent quality writing, it is rare to see a nice blog like this one today..

  11. After exploring a few of the blog posts on your web page, I really appreciate
    your technique of writing a blog. I book marked it to my bookmark
    webpage list and will be checking back soon. Please check out my web site too and
    let me know what you think.

  12. you’re in point of fact a just right webmaster. The website loading velocity is amazing.
    It kind of feels that you’re doing any unique trick.
    Moreover, The contents are masterwork. you have done a great activity in this topic!

  13. Thanks for the helpful post! This article was really good. Thanks and good luck!

Leave a Reply