Thursday, November 27, 2008

Syntax-highlighting code in blog posts

SyntaxHighlighter is an easy to use syntax highlighter for posting code snippets in blogs. Here are the steps to incorporate SyntaxHighlighter into Blogger:

  • Go to the blog dashboard and select Layout for your blog.
  • Choose Edit HTML.
  • In the <head> section, paste in these two lines:
        <link href='' rel='stylesheet' type='text/css'/>
        <script language='javascript' src=''/>  
  • In addition, for each language that you intend to highlight, add lines to import the relevant JavaScript libraries. The full list of supported languages is here. Here's the example for XML:
        <script language='javascript' src=''/>
  • Finally, right at the bottom before the </body> tag, add:
      <script language='javascript'>
  • Save the blog template.
  • Now, in blog posts, surround code sections with (replace the class with the appropriate language name):
      <pre name="code" class="xml">...your code...</pre>
SyntaxHighlighter provides some configuration options that provide control over the layout of the highlighted code. It can also be used with <textarea>s instead of <pre>.

Sunday, November 23, 2008

Cloud Connect 2009

Cloud Connect

Cloud Connect 2009 is a free unconference with technical sessions about cloud computing. It's being held at the Computer History Museum in Mountain View, California from January 20th to 22nd 2009.

Register today!

Migrating from Palm Calendar to Google Calendar and iPhone

Here are the free steps to migrate from Palm's date book (or Pimlico's DateBk6) calendar to Google calendar for full iPhone sync.

First, sync Palm with Palm Desktop.

Next, open Palm Desktop, select the Calendar view, navigate to File | Export, select Export Type as Date Book Archive, Range as All and provide a file name. This will export the calendar data as Date Book Archive (.dba).

There's a paid tool called DBA2CSV that converts .dba files to .csv files. However this can be done for free using Yahoo Calendar. Login into Yahoo Calendar and via Settings/Import, import the .dba file. It helps to have an empty Yahoo Calendar. Via Settings/Export, export the calendar as .csv file.

Login to Google Calendar (also works with Google Apps For Your Domain GAFYD Calendar) and import the .csv file into any of the calendars. It is a good idea to create a test calendar and test the import before importing into your real calendar. That way if anything goes wrong, you can delete the test calendar.

Follow the instructions here to create an account at NuevaSync and setup sync on the iPhone.

Seems like a lot of steps but it's a pretty smooth and free migration, after which you have a calendar that's accessible on the cloud and on the iPhone, with the iPhone's builtin alert mechanisms. If you have any difficulty with any step, post a comment.

Monday, November 17, 2008

Mashup Camp 2008

Mashup Camp 2008 starts today and runs though the 19th. Full camp schedule is here.

Mashup Camp 2008