Share your development server with a reverse ssh tunnel

Date Category tech

Sometimes you want to allow someone access to your development server (e.g. a Django or Rails dev server) running on port 8000 on your laptop. Unless the other person is on the same subnet as you, it’s very likely there’s a firewall between you. (Whether you’re at home, on a company LAN, or at Starbucks.)

Assuming you have access to a Linux host that is publicly accessible, this is easy to work around. I personally have a tiny virtual host that gives me remote ssh access and runs a few little services for me, so I use this host.

This is a quick and dirty way to open up access to your dev server by using ssh and a publicly accessible remote server as your proxy.

more ...

Database file storage for Django

Date Category tech

Django provides a good mechanism for handling file attachments as model fields, using the FileField and ImageField classes. These field types store the path to a file in the database, while facilitating the actual file storage on the filesystem through the Storage API. They even come with the interface widgets to handle uploads in the model admin, so it’s a simple feature to activate. But where can we store file contents?

more ...

Dr. Wily’s theme on piano

Date Category games

The best cover of Dr Wily’s theme (Mega Man 2) you’ll hear all day. It starts slowly, but stick around.

Illuminating git workflows (or, -p is your friend)

Date Category tech

Git is a fast, lightweight, and powerful revision control system. One of its strengths is that it is built on simple primitive actions, which can be woven together to build some robust workflows. This can come in the form of third-party tools, or even in the more advanced commands available in git itself.

One such advanced workflow is offered by the -p (--patch) option that is available in several everyday git commands:

more ...

DroidWall: Open source Android firewall

Date Category tech

Note: Your device must be rooted to use this app.

DroidWall logo

Smartphones are sort of a security nightmare. They contain or grant access to much of your private data, and yet you install dozens or hundreds of untrusted applications onto them. The permission model helps, but how carefully do you review permissions before you decide to install an app? (How often do you sigh, say “FINE” and install the app anyway?)

DroidWall is an open source firewall app. It sits on top of Linux’s built-in firewall capability (iptables) and lets you grant or deny internet access on a per-app basis. This means you can block apps that don’t need internet access to function from sending your personal data back to their servers, tracking you, and even showing ads in some cases.

Everyone should be using this app. When in whitelist mode, you know exactly which apps you’ve given permission to reach the internet; no app can surprise you and phone home without your explicit permission.

(The open source project home can be found here.)

Helpful dog

Date Category random

Helpful dog.

It looks like you’re trying to write some code. Would you like help?”

Pianobar: Console Pandora client

Date Category tech

Console junkies: If you weren’t aware of this one, it’s worth checking out. Play your Pandora stations from a terminal instead of a browser. I’m pretty sure it doesn’t play ads either.

Pianobar Screenshot

Auto-switch to external monitor in Linux

Date Category tech

I move my laptop around a lot, and I’m often connecting to or disconnecting from my external monitor. Switching to this display manually was getting annoying (since Ubuntu apparently broke the Fn+F8 method), so I wrote this:

more ...