I've recently started migrating from OS X to Debian testing branch with gnome3 for development work. The zoom and show-all-windows buttons on my Logitech Performance MX mouse aren't bound to anything by default, and Logitech doesn't provide drivers, so I had to figure out how to do it myself. Packages used:

sudo apt-get install xbindkeys wmctrl xautomation terminator

xbindkeys was used to bind these commands, and blocks of code go in ~/.xbindkeysrc. Sidenote for xbindkeys: the daemon that runs doesn't refresh the source file by itself, so killall xbindkeys; xbindkeys when you make changes.

Switch to or open new terminal

This binds the zoom button (b:13) to open the terminal, and requires the wmctrl package:

#logitech performance mx "zoom" -> terminal
#this switches to the first terminator instance, or spawns a new one
"/usr/local/bin/terminator"
b:13

/usr/loca/bin/terminator will switch to a running instance of terminator, my new terminal emulator of choice, or launch a new instance if it can't find it:

Show all windows

This one was bound to the show all windows button (b:10), and requires xte, found in the xautomation package. It's a tad cludgey, actually emulating the super key, which in gnome3 brings up an exposé-esque view of all open windows like in OS X. Because of how xte doesn't unbind the normal click of the key, and gnome3 won't bring up the activities view while clicking, it must be bound to the release of the button rather than just the button.

This isn't a huge amount of code but I spent quite a bit of time trying to get nginx to behave.

Makes Django storage URLs expire after a set amount of time. Built to be used with nginx's secure_link module, essentially emulating Amazon's S3's similar functionality. Because it's a mixin, you can theoretically use it with any Django storage method, but it will only limit access if there's a properly configured nginx server actually serving the files. SecureFileSystemStorage is included, but again, you can use any base Storage class you want.

I wrote this for one of my work projects and decided to throw it up here. It might not be notable for more experienced developers, but this blog is really meant to chronicle my experiences so I can look back on them later. So, expect more stuff like this.

Scratchpad

Scratchpad is a very simple blog app I wrote in 5 hours or so to get back into the groove of programming with Django. Nothing fancy like comments or file uploading are that planned at the moment. You can see it in action at http://blog.wizpig64.com/