How to prevent hotlinking without mod_rewrite

Sometimes you don’t have mod_rewrite at your disposal, and yet you want to prevent hotlinking. Here’s how: <FilesMatch "\.(gif|jpe?g|png|wmv|avi)$"> SetEnvIfNoCase Referer ^$ allow_access=1 SetEnvIfNoCase Referer ^http://(www\.)?wejn\.org($|/) allow_access=1 Order Deny,Allow Deny...

My email address

In case you were wondering, here’s my email address: #!/usr/bin/ruby a=(("a".."z").to_a+["@","."]);p(("%b"%[0x645bbb83a6a496] ).scan(/...../).map{|x|a[Integer("0b"+x)]}.join.reverse)

Conway's Game of Life redefined

I have no clue where I found this clever implementation of Conway’s Game of Life but I like it a lot: char*b= " " " " " ## " "...

On file change run...

Problem I often find myself wanting to re-run some command (say pdflatex) when some file changes. It’s not a particularly difficult problem, but here’s my take on it. Solution #!/usr/bin/ruby...

Test page

You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways,...