Skip to content

Instantly share code, notes, and snippets.

💭
merging your prs

Tom MacWright tmcw

💭
merging your prs
Block or report user

Report or block tmcw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:25809
require 'rubygems'
require 'RMagick'
# This script draws ukulele chords for use in
# tabs or elsewhere
#
# Author:: Tom MacWright (mailto:macwright@gmail.com)
# Copyright:: Copyright (c) 2008 Tom MacWright
# License:: BSD License
View mollom.module
/**
* This function generate an array with all the information required to
* authenticate against Mollom. To prevent that requests are forged and
* that you are impersonated, each request is signed with a hash computed
* based on a private key and a timestamp.
*
* Both the client and the server share the secret key that is used to
* create the authentication hash based on a timestamp. They both hash
* the timestamp with the secret key, and if the hashes match, the
* authenticity of the message has been validated.
View gist:78207
PACKAGE:=osm2pgsql
VERSION:=0.65
SVN:=$(shell svnversion)
CC = gcc
CXX = g++
#alias pg_config='/opt/local/lib/postgresql83/bin/pg_config
CFLAGS += -g -O2 -Wall -Wextra
View gist:90594
from optparse import OptionParser
import subprocess, os, re
'''
Runzip: recursively unzip
'''
parser = OptionParser()
View gist:91240
'''
Usage:
python grow.py > grow.log &
'''
import time, os
View rough_cast_money_to_int
update naf_join set ppexpend05i = int4(replace(replace(replace(ppexpend05, 'N/A', '0'), '$', ''), ',', ''));
View gist:148496
# Restrict layer list, if requested
if self.layers and self.layers != self.name:
layers = self.layers.split(",")
for layer_num in range(len(m.layers)-1, -1, -1):
l = m.layers[layer_num]
if l.name not in layers:
del m.layers[layer_num]
if self.debug:
print >>sys.stderr, "Removed layer %s loaded from %s, not in list: %s" % (l.name, self.mapfile, layers)
View gist:150963
<?xml version="1.0" encoding="utf-8"?>
<Map srs="+proj=latlong +datum=WGS84" bgcolor="rgba(0,0,0,0)">
<Style name="_public___osm_highways_new___the_geom__sql_20090614163732542_style">
<Rule>
<Filter>([type]='motorway')</Filter>
<LineSymbolizer>
<CssParameter name="stroke">rgb(200,200,200)</CssParameter>
<CssParameter name="stroke-width">1.2</CssParameter>
<CssParameter name="stroke-linejoin">bevel</CssParameter>
<CssParameter name="stroke-linecap">square</CssParameter>
View gist:150969
ls -lR | grep -viE "334" | wc -l
View gist:158842
var kml_layers = new Array();
/**
* Process KML Layers
*
* @param layerOptions
* Object of options
* @param mapid
* Map ID
* @return
You can’t perform that action at this time.