Tag: Fun

www.ǝɥɔɐɔʇǝʌlǝʌ.com

December 27, 2010 » Geek

2010-12-27
So, something really simple was staring me in the face and I ignored it. CSS transforms. I’ve switched to that, but I still like the webkit stuff, it was fun to glue together.

This Sunday I tinkered for a few hours on a little project. I registered the Unicode version of my domain name, upside down (ǝɥɔɐɔʇǝʌlǝʌ) This was inspired by the post from The Sad Story Of The Unicode Snowman: ☁→❄→☃→☀→☺→☂→☹→✝.ws as posted on Hacker News.

It had to be a .com, but I bought it from DreamHost anyway.

Next I thought about Upside-Down-Ternet from a while back, but I wanted mine to be all upside down.

So, I glued together some stuff and I now have an upside down copy of this website at that domain. It’s a bit rough right now, I’m rendering it in Webkit with wkhtmltopdf and then rotating and slicing with ImageMagick, all glued together with PHP and some shell scripting.

I want it to be an actual HTML copy eventually, but if you visit my domain it should show you anything on www.velvetcache.org. You can even view this post: http://www.ǝɥɔɐɔʇǝʌlǝʌ.com/2010/12/27/www-ǝɥɔɐɔʇǝʌlǝʌ-com

I added a little link to all of my pages to let you flip them in place, it’s the very bottom right and it says “[dılɟ]”. It’s my newest little easter egg, like the Konami Code.

Tags: , , ,

Tail In PHP

December 3, 2010 » Geek

So I’m working on a little admin interface and I decided to tail some logs. It’s in PHP and Google came up with some stuff, but they were all a bit finickey and not well documented. So I wrote my own!

Here’s the basic concept:

  1. Open File
  2. Seek To End
  3. Loop:
    1. Seek Back By Chunk Size
    2. Read Chunk
    3. Count Newlines
    4. Stash In Buffer
    5. Break If Enough Newlines Total
  4. Trim Extra Line & Cruft
  5. Done!

Here’s the code:

You can give it a try on some junk data here: http://static.velvetcache.org/pages/2010/12/03/tail-in-php/

Detours Clone

November 4, 2010 » Geek

This week Jerod Santo released a nifty little app he had written for the Mac called Detours. It’s pretty cool, it’s a nice GUI where you can add routing information. So, you can make the DNS resolver think google.com is located at 127.0.0.1. Stuff like that.

I use Linux though, and I wanted some of that goodness. Unfortunately, Jerod told me that Detours uses some OS X specific API calls. So, cool for Mac folks but lame for me.

That evening I set off to write a portable version of Detours by using the hosts file (/etc/hosts) on Linux. Naturally since I’m groking a text format it’s uglier, and it requires a daemon/client set up since the hosts file is write-locked for normal users.

But, I got one working that night and I’ve built it out since then. So I present to the Linux users of the world, Detours Clone. Lame name I know, if you have a suggestion for a better one let me know.

Anyway, I have a nice Python daemon and three Python clients (Qt4, GTK+ and a web server!). They speak JSON over TCP sockets (bound to 127.0.0.1 of course) and work well so far. I even wrote a few tests and a distutils installer.

So go check it out!

The Qt4 Client
The Qt4 Client

Node Knockout – Team LazerCatz!

August 30, 2010 » Geek

This weekend I participated in Node Knockout with Jerod and Cody. It was awesome, we made a game in 48 hours (less than that of actual working time).

LazerCatz!
LazerCatz!

It was a lot of work, how much?

We had 129 total commits, 82 were mine, 35 belonged to Jerod, and 12 to Cody. That’s not 100% accurate because Cody had some git problems part way through, so I committed things for him. In those commits we had 245 file changes.

The final product had 974 total lines of code, as broken down by CLOC:

If you have a minute, give it a shot at http://www.lazercatzthegame.com/.

More Lomo Photos

July 14, 2010 » Geek, Life

We found and developed four rolls of film the other day. Here are some of my favorites from the batch. Fisheye shots are Darcy’s, the others should all be mine (some of these are few years old though, so no promises on that).