reCAPTCHA and code-prettify

I spent an hour or so configuring my blog to use reCAPTCHA instead of forcing people to signup for silly accounts. The bad thing about this is that sometimes the CAPTCHA’s are really hard. Currently, it’s a bit annoying because if you mess up, it takes you to this confirmation page. If your browser is weird, it may lose your comment in the process. Maybe this can be done with an AJAX call before the submit goes through.

I spent another hour replacing my old syntax highlighting code (using some javascript from pygments.com). I think how this old one worked was that it would send the text over to a server which was running pygments and return the highlighted code. Instead, I’m using a fully client-side highlighter from google, code-prettify. It is actually quite good. Specifying the language is optional and it can still try to infer the correct highlighting. I mucked around in Markdown to make it so I could specify the language. Here’s the syntax I adopted (I’d seen similar syntax with other syntax highlighters for Markdown):

This is how I do $\LaTeX$.

    ::: python
    var foo = bar;

This `code here` is unspecified and code-prettify will still
give it a go.

I’ve been toying with the idea of making a completely client-side blog. That is, my webpage would be strictly the model and the browsers would be the viewers. The browser would run a javascript implement of Markdown. I think it’d be a fun thing to do and is a bit orthogonal from most blogging platforms.

Leave a comment

Recent Entries

  • Which

    I haven't posted in a while. It's not that I've been busy or anything. I'm in the waning years of my education and thankfully, I...

  • Good Use

    I think my biggest gripe about my education has been how quickly I lose it all. Every now and then, I like to read research...

  • Facebook Sucks, Again

    Do you remember the last time [Facebook sucked](http://www.mrawde.com/blog/2009/03/facebook-sucks.html)? Facebook tends to suck every now and then, with the spikes coming whenever they change something. Well,...

  • Best Of

    It's getting near the end of the year which means its about the time people start going crazy with lists: * Christmas Lists * Best...

  • New York City

    I spent last weekend in New York City. It was my second time in New York but the first time I really got to see...

Close