Category: Code Recipes

Page:  
Nov
13

Git for Newbies: A Quick Workflow Example Using Github.com

I like git, but it can be daunting the first time you try to use it.  So I’ve come up with this little blog post. . .

Oct
20

Handy Trick for Instantly Serving the Current Directoy

Type this command at the command line.  This is super handy when you need to copy something off a server and do not want to. . .

May
7

Check to Make Sure a Process is Running and Restart it if its Not: A Recipe in Python

Sometimes processes can be stopped because a machine is rebooted or for some reason the process has stopped running. This short little Python program will. . .

May
7

An Enhanced Timeout Function for Python: timeout.py

This python class is designed to timeout a function if something it hangs for too long. It was originally created by Speno’s Pythonic Avocado (I. . .

Apr
25

How to Ignore Compiled Python (.pyc files) and other Files in Subversion

1.) Create the file ‘.svnignore’ in you projects root directory. Use your favourite text editor: nano, vi, vim, emacs, etc to create and edit the. . .

Nov
15

Fun with Bit.ly in Python

I was just playing with the bit.ly python library and wrote a quick function & command line utility to shorten URLs. Prerequisites = bitly.py, simplejson. . .

Jun
9

Creating a New Mysql database on the Command Line…The Easy Way!

The following Python script  can make your life easier if you often need to create new, blank, databases for a Rails,  Django, or for any. . .

May
8

Simple Python Class Library and Command Line Utility for S3 Storage and Retrieval

Hello.  This is based on the Python Boto library.  I created a class with a couple functions for storing and retrieving information (either publicly or. . .

Apr
15

Removing Asterisk on Ubuntu 6,8

This little recipe works for me if you’re not using any special hardware. Run these commands as root or use sudo. This will work for. . .

Mar
2

Installing MySQL for Python on Mac OS X (MySQLdb)

I was having issues setting up MySQL Python when I was setting up a Django development environment on Mac OS X. This works fine on. . .

Page: