Highlighting Source Code in HTML

I have just finished with configuring the code prettifier on one of my site. It was so easy to implement and took hardly 5 minutes to complete the configuration.

Code Prettifier supports many language syntaxes, like Java, C, C++, PHP, HTML, Bash Scripts etc.

Here are the steps to setup Code Prettifier on your website running wordpress blog.

  1. Download code prettifier distribution.
  2. Upload the script and stylesheets in your theme folder (you will need to adjust the paths in the script and link tag)
    <link href="prettify.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="prettify.js"></script>
  3. Add onload="prettyPrint();" to your document’s body tag.
  4. Put your code snippet in following tags and it will highlight the code automatically.
    <pre class="prettyprint">...</pre>
    or
    <code class="prettyprint">...</code>

Thats all you have to put in your theme to get this lovely highlighted source code features in your blog.

Semester Exams are here !

Another semester is complete and I am preparing for the exam. I am gradually moving towords completion of my MS program.

This semester, I believe, was one of the best I have had so far. I studied Marketing Management and Design Patterns, both were wonderful courses and the Professors were brilliant.

I have enjoyed the class room studies but preps are not good ;). I will be back on Tuesday 19th June, to write about what happened in the Exams.

Wish me Good Luck !

Two days hardwork

This week was full of learning, atleast for me in the office. My company switched to Linux Operating System. Details about why switched? isn’t important here. But the whole experience of switching to Linux was very exciting. By the way we have installed Ubuntu Linux in the office.

Configuring Linux was tedious but interesting because I wanted to learn how it works. I have been installing and uninstalling Linux on my home PC but that was just for fun, never thought of setting up development environment though I tried to do many times but I lost my interest all the time :).

Few things I would like to mentioned that took a lot of time to configure. First configuring the Graphics card; it was pain to configure VGA card, we crashed GDM many times but we figured how to recover the xorg.conf and configure the display driver with few exceptions.

Secondly the most important task is to importing mails from Microsoft Outlook to Thunderbird. If you don’t know just try Google how to import mails from Outlook to Thunderbird.

This could have been more days work if few of our colleagues didn’t have past experience. All is well that ends well, so far ;).

Cheers! Linux

« Previous PageNext Page »