Highlight Code Syntax in WordPress Tips

Posted: January 26th, 2011 | Author: | Filed under: web | 14 Comments »

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];
}

14 Comments on “Highlight Code Syntax in WordPress Tips”

  1. 1 forex software review said at 10:51 pm on April 10th, 2011:

    Thanks for the helpful post! I would not have gotten this otherwise!

  2. 2 appliance repair Irvine said at 7:40 pm on May 4th, 2011:

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

  3. 3 emborrirm said at 9:02 am on July 18th, 2011:

    learned a lot

  4. 4 szlifierki said at 2:58 pm on July 30th, 2011:

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

  5. 5 sustanon said at 8:34 am on October 12th, 2011:

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

  6. 6 deca durabolin said at 4:03 pm on November 21st, 2011:

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

  7. 7 appliance repair said at 12:30 pm on December 14th, 2011:

    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!

  8. 8 Jc Nilsson said at 12:46 pm on February 7th, 2012:

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

  9. 9 ELITE BOHEMIA said at 8:05 am on March 7th, 2012:

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

  10. 10 appliance repair Orange said at 1:23 pm on March 19th, 2012:

    Thanks in advance and good luck, shallwelearn.com ! :)

  11. 11 forum pozycjonowanie said at 2:13 am on March 27th, 2012:

    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?

  12. 12 Antony Fabel said at 9:35 am on May 30th, 2012:

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

  13. 13 http://maryannrabbitry.com/new-zealand-rabbits-in-ontario/ said at 4:23 pm on June 1st, 2012:

    Hi there, just became alert to your blog through Google, and found that it’s really informative. I’m gonna watch out for brussels. I will appreciate if you continue this in future. Lots of people will be benefited from your writing. Cheers!

  14. 14 Hee Megill said at 8:50 pm on June 4th, 2012:

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


Leave a Reply