Tag: Projects

Flip WordPress Plugin

December 28, 2010 » Geek

So I took a few minutes and slapped together a plugin for WordPress that lets you “flip” your website upside down. I basically just packaged up the code from the last post.

Grab a copy here: https://github.com/jmhobbs/Flip. It works for me in Firefox and Chrome.

Headless VirtualBox

December 2, 2010 » Geek

Updated (2010-12-02)

So, duh, multiple interfaces. One NAT one Host-Only. All done.

I recently set up a VirtualBox VM to test BlankSMTP locally, but it’s annoying to have the GUI up all the time when I’m just SSH’ing in. To get around this I set it up to work headless.

The biggest hangup is networking. I had to switch it to Host-Only so that the interface would remain consistent. Other wise with bridged I would get new IP’s all the time, and even then only when the networking init script got triggered somehow.

After that was set I just wrote two quick bash scripts to start and stop. An init script would also be an option if I wanted to make sure it shut down when I power off the laptop, but I decided it wasn’t worth the trouble.

The key commands are VBoxHeadless -startvm [vm name] and VBoxManage controlvm [vm name] savestate

blanksmtp-start

blanksmtp-stop

Works like a charm!

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

Developing For Twilio In PHP – Introducing Twillip

September 16, 2010 » Geek

Last weekend I had the fun opportunity of building my first Twillio app with a group at the Omaha Startup Weekend. We wrote a phone based version of chattroulette called Call Spinner which includes a cool advertising system we hope to expand on.

Developing for Twilio isn’t that hard, it’s mostly just about generating the right XML. We used the PHP library Twilio provides and it’s pretty nice, but debugging off of the Twilio website was a waste of money and not much fun.

So, over the last few days I worked out a nice debugging tool I decided to call Twillip. What it does is conditionally wrap your code and prints it in a clean fashion, with links and variables and other goodies like that.

Super simple to use too! Here, this is a contrived example. Normally you probably want some sort of cool dispatcher (I have one of those if you want it) and to check that requests are signed, etc.

example.php

Sweet, so what does that buy us? Only this awesome interface is all!

Twillip - Oops!

But there is an error! $_REQUEST['Caller'] isn’t set. We can fix that by clicking on the Add New Input and filling it in.

Twillip - New Input Prompt

Twillip - New Input

There it is! Now we can click Reload Page and it will refresh with all of the inputs.

Twillip - No More Errors!

You can’t tell in the image, but the Redirect and Play verbs are both clickable links, and will bring all of the variables in the input section with them.

Seeing is believing, so try it out at http://static.velvetcache.org/pages/2010/09/16/developing-for-twilio-in-php-introducing-twillip/demo/

You can grab the source at http://github.com/jmhobbs/Twillip.

PanoramAh: Version Two

August 25, 2010 » Geek

Last week I put together a quick script to display a panorama I took in Colorado.

It was a one-off script and I didn’t think much of it until Naina Redhu left a comment asking about using it for multiple panorama’s.

Well, why not?

It didn’t take much to tweak it into a full fledged jQuery plugin. I just took the bit that made the panorama and tweaked it to use local references. While I was at it I removed the requirement for a pre-loader image in the markup. Have a look.

Using it is pretty easy too, just set up your HTML like so:

Then make a collection and call panoramah() on it:

There’s a demo available here and you can keep up with any changes at Github.