lukecod.es

Code and a mustache

This Blog Now Is Now Powered by pushState

| Comments

Click around some internal links on this blog. You’ll notice that on supported browsers this blog no longer uses full page refreshes. Instead the content of the next page is grabbed with AJAX, parsed on the client-side*, and then inserted into the proper content node. While that is being done, instead of using hashbangs to save the state, I’m using the HTML5 history API.

Be on the lookout over at the Tag Soup blog on Monday as I will be doing a full write-up on this for Tag Soup’s 30 Day Challenge.

*Note: I understand that this isn’t the best way to do it since we are sending the full page content over the wire, but only using part of it. A better solution would be to have Jekyll generate separate html files for just the content of each page.

Shake ‘N’ Bake Console setTimeout Bomb

| Comments

Apparently, everyone knows that setTimeout console bombs are the best. I didn’t until my friend Tony Camp showed me but now I can see the light and I’m never going back. This is something that I whipped up so you can throw it in the console of your best friend (or enemy) and try to give them a seizure. Everyone wins.

Instagram Liquid Tag Plugin for Jekyll and Octopress

| Comments

Being new to the world of Ruby (and obviously Jekyll), I thought a good initial learning experience would be to write a liquid tag for Jekyll to display an Instagram photo. I finished up a decent enough version of the code, and it’s actually in use over at lukelov.es to display all my Instagrams. Check out this page for a complete example of what the finished product looks like.

It is a simple liquid tag which takes one parameter, the ID of a media item from Instagram. The code then fetches the media item using Instagram’s ruby gem, and writes a bunch of relevant HTML to the page.

The First Post

| Comments

Octopress has been cloned and I now have my first Jekyll blog (and first ever blog).

This will be dedicated to code with a little facial hair thrown in for good measure.