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 thoughts on “Highlight Code Syntax in WordPress Tips”

  1. 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!

  2. 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..

  3. 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.

Leave a Reply to appliance repair Orange Cancel reply