Archive for May, 2009

GNU Screen Basic Tutorial

If you’ve ever SSHed into a server, ran something, logged off and got frustrated because whatever you were running stopped running because you had to change coffee shops or go to class then you’ve experienced the need for GNU Screen. Put simply it allows you to maintain a persistent session, a terminal that does not [...]

Continue reading »

Deploying MoinMoin on Ubuntu using Apache mod_wsgi

I just went through a somewhat lengthy setup process to deploy a moinmoin wiki on Ubuntu. There’s a lot of documentation on it which actually makes it take a bit longer than I’m used to for getting something running on Ubuntu.  I thought I’d share my streamlined notes for this common deployment scenario. The first [...]

Continue reading »

Using Arguments in a Shell Script

Within 5 seconds of looking at a shell script I’m usually opening a new file in my text editor to re-write the ugliness into something that makes more visual sense.  To me at least python is highly preferable. Still I use shell scripts all the time to batch a group of commonly used sequential executions, [...]

Continue reading »

‘drop’ Database Command for Django Manager

The Django manager is a really handy tool.  I wrote earlier about making your own custom managers and there is a lot of other great documentation on it. Django comes with a bunch of helpful management commands like ‘flush’, ‘syncdb’, ‘test’, etc. I’ve created a generic ‘drop’ command as I felt it was missing.  I [...]

Continue reading »

Testing AJAX Requests in Django

Django has a really handy function on the request object that will determine if the request was an AJAX request (an XMLHttpRequest). request.is_ajax() It simply checks whether the HTTP_X_REQUESTED_WITH header is equal to ‘XMLHttpRequest’, a standard that’s supported by most javascript libraries. You can read more about it and see the list of supporting frameworks [...]

Continue reading »

Some Notes and Requests on Django Signals

I’ve finally gotten around to playing with the Django Signals.  I’ve been pleased so far but I feel its currently missing a few key features. Some background: Django Signals allows developers to more easily break up their code into separate components which allows much greater freedom and organization.  Often as a web application expands you [...]

Continue reading »

Simple MySQLdb Example

MySQLdb is a python interface to MySQL.  I wrote the following simple script for some database tests and thought it might be handy to others looking for tutorials or examples. It simply connects to MySQL, drops and creates a database called ‘testdb’, makes a table called ‘waves’ with columns ‘sin’, ‘cos’, ‘tan’, and ‘date’ and [...]

Continue reading »

Road Bikes are Waaaay Better than Target Bikes

Recently I bought a junky Road bike to hold me over for a while in Minnesota while I build my return to my beautiful road bike in California. I’m leaving it there for now for several reasons. It costs a lot to ship, I’m never sure how much longer I’ll be in Minnesota, and I [...]

Continue reading »

Follow

Get every new post delivered to your Inbox.