Public Gists by mojodna

Gravatar
Sun Oct 18 12:21:08 -0700 2009
1
2
3
"""
Parses and converts the Flickr Shapefiles Public Dataset, Version 1.0
http://code.flickr.com/blog/2009/05/21/flickr-shapefiles-public-dataset-10/
Gravatar
Fri Oct 09 08:22:57 -0700 2009
1
2
3
# Twisted implementation of fire-hydrant Google Earth visualizer
# (http://github.com/mojodna/fire-hydrant)
#
Gravatar
Wed Sep 16 13:41:20 -0700 2009
1
2
3
EM.run {
  # ... other EM stuff ...
  Thin::Server.start {
Gravatar
Mon Sep 14 21:03:15 -0700 2009
1
2
3
from TileCache.Layer import Layer, Tile
Tile(Layer("foo", spherical_mercator=True, tms_type="google"), 607, 754, 11).bounds()
# y values are inverted
Gravatar
Thu Jul 23 08:49:43 -0700 2009
1
2
3
sqlite> .schema tracks
CREATE TABLE tracks (_id INTEGER PRIMARY KEY AUTOINCREMENT, name STRING, description STRING, category STRING, startid INTEGER, stopid INTEGER, starttime INTEGER, stoptime INTEGER, numpoints INTEGER, totaldistance FLOAT, totaltime INTEGER, movingtime INTEGER, minlat INTEGER, maxlat INTEGER, minlon INTEGER, maxlon INTEGER, avgspeed FLOAT, avgmovingspeed FLOAT, maxspeed FLOAT, minelevation FLOAT, maxelevation FLOAT, elevationgain FLOAT, mingrade FLOAT, maxgrade FLOAT, mapid STRING);
 
Gravatar
Mon May 18 17:42:27 -0700 2009
1
2
3
# Updating Ruby OAuth Consumers to 1.0a
 
In response to April's [OAuth Security Advisory](http://oauth.net/advisories/2009-1), the OAuth community has penned a [new draft of the specification](http://oauth.googlecode.com/svn/spec/core/1.0a/drafts/3/oauth-core-1_0a.html), titled 1.0a (currently in draft 3). This makes a number of changes to the flow:
Gravatar
Sun May 17 15:16:34 -0700 2009
1
2
3
// accessing application-specific preferences
 
SharedPreferences prefs = getPreferences(MODE_PRIVATE);
Gravatar
Thu May 07 08:08:18 -0700 2009
1
2
3
#!/usr/bin/env ruby -rubygems
 
require 'oauth'
gist: 89897 customized xen-tools config...
Gravatar
Fri Apr 03 11:55:48 -0700 2009
1
2
3
##
# /etc/xen-tools/xen-tools.conf
##
gist: 89896 dhcp for xen
Gravatar
Fri Apr 03 11:54:35 -0700 2009
1
2
3
# Configuration file for dnsmasq.
#
# Format is one option per line, legal options are the same
Gravatar
Tue Feb 24 18:51:38 -0800 2009
1
2
3
# ~/.bashrc
 
# tab-completion for git subcommands
gist: 67663 nicksieger's jsonpretty exa...
Gravatar
Fri Feb 20 11:54:31 -0800 2009
1
2
3
jsonpretty: A command-line JSON pretty-printer.
 
Get it: gem install jsonpretty
Gravatar
Wed Jan 07 18:06:02 -0800 2009
1
2
3
#!/bin/sh
#
# git-svn-diff
Gravatar
Tue Jan 06 12:51:45 -0800 2009
1
2
3
#!/usr/bin/env ruby
 
require "oauth"
Gravatar
Fri Dec 19 16:22:59 -0800 2008
1
2
3
#!/usr/bin/php -q
<?php
/**
Gravatar
Tue Dec 09 16:33:22 -0800 2008
1
2
3
<?xml version="1.0" encoding="utf-8"?>
<rsp stat="fail">
  <err code="11" msg="Something bad happened" />
Gravatar
Mon Dec 08 14:52:35 -0800 2008
1
2
3
require 'sinatra'
require 'RMagick'
 
Gravatar
Sun Nov 16 14:23:10 -0800 2008
1
2
3
# even simpler colorization for everything (assuming you're not using a lesspipe.sh already)
# (add to your .bashrc)
export LESS="-r"
Gravatar
Tue Nov 04 16:16:52 -0800 2008
1
2
3
#!/usr/bin/env ruby
 
require 'rexml/document'
Gravatar
Tue Nov 04 14:55:15 -0800 2008
1
2
3
<html>
  <head>
    <title>Flickr WOE ID Alpha Shape viewer</title>