I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis onto
the box and here's how I did it and some things to look
out for.
To install:
| require 'formula' | |
| def mysql_installed? | |
| `which mysql_config`.length > 0 | |
| end | |
| class Php <Formula | |
| url 'http://www.php.net/get/php-5.3.5.tar.gz/from/this/mirror' | |
| homepage 'http://php.net/' | |
| md5 'fb727a3ac72bf0ce37e1a20468a7bb81' | 
| #!/bin/bash | |
| # postactivate | |
| # This hook is run after this virtualenv is activated. | |
| cd ~/Projects/internal_kct/reb/ | |
| if [ "${OLDPATH}" == "" ]; then | |
| echo "SETTING PATH" | |
| export OLDPATH=$PATH | |
| export PATH=$PATH:~/Projects/internal_kct/reb/bin/ | |
| fi | |
| watch_coffee_sass | 
This gist is no longer valid. Please see Compass-Rails for instructions on how to install.
| # First, clear out any old mapnik or node.js installs that might conflict | |
| sudo apt-get purge libmapnik libmapnik-dev mapnik-utils nodejs | |
| # Also clear out any old ppa's that might conflict | |
| sudo rm /etc/apt/sources.list.d/*mapnik* | |
| sudo rm /etc/apt/sources.list.d/*developmentseed* | |
| sudo rm /etc/apt/sources.list.d/*chris-lea* | |
| # add new ppa's | |
| echo 'yes' | sudo apt-add-repository ppa:chris-lea/node.js | 
| def trans_lat(lat) | |
| lat =~ /([0-9]+)([NS])/ | |
| num, dir = $1.to_i, $2 | |
| dir == 'S' ? -num : num | |
| end | |
| def trans_long(long) | |
| long =~ /([0-9]+)([EW])/ | 
| #! /usr/bin/env python | |
| from boto.ses.connection import SESConnection | |
| import os | |
| import sys | |
| import subprocess | |
| import socket | |
| TMPFILE = '/var/run/postgresql/last-wal-archive-error-file.tmp' | |
| if __name__ == '__main__': | 
| """ | |
| Read graphs in Open Street Maps osm format | |
| Based on osm.py from brianw's osmgeocode | |
| http://github.com/brianw/osmgeocode, which is based on osm.py from | |
| comes from Graphserver: | |
| http://github.com/bmander/graphserver/tree/master and is copyright (c) | |
| 2007, Brandon Martin-Anderson under the BSD License | |
| """ | |
| import xml.sax |