Skip to content

Instantly share code, notes, and snippets.

View adrianrego's full-sized avatar
🏠
Working from home

Adrian Rego adrianrego

🏠
Working from home
View GitHub Profile
@rajanski
rajanski / gist:ccf65d4f5106c2cdc70e
Last active October 24, 2021 04:11 — forked from aflaxman/gist:287370
OSM to networkx graph with node coordinates ;-)
"""
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
@mikeyk
mikeyk / watch_wal-e.py
Created January 16, 2013 20:24
Watch_wal-e script
#! /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__':
@hannahwhy
hannahwhy / convert.rb
Created November 24, 2012 23:16
PNG -> GeoTIFF conversion for Blue Marble PNGs
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])/
@springmeyer
springmeyer / install-tilemill-latest.sh
Last active April 7, 2022 20:00
install bleeding edge tilemill, nodejs, and mapnik
# 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
@chriseppstein
chriseppstein / readme.md
Created August 31, 2011 21:57 — forked from mislav/Gemfile
How to integrate Compass with Rails 3.1 asset pipeline

This gist is no longer valid. Please see Compass-Rails for instructions on how to install.

@issackelly
issackelly / postactivate
Created July 4, 2011 18:51
Compass and CoffeeScript in Virtualenv
#!/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
@henrikbjorn
henrikbjorn / php.rb
Created January 12, 2011 21:45 — forked from cranberyxl/php.rb
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'
@bdotdub
bdotdub / redis.markdown
Created November 24, 2010 22:18
Running redis using upstart on Ubuntu

Running redis using upstart on Ubuntu

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: