Skip to content

Instantly share code, notes, and snippets.

View adamw523's full-sized avatar
🎯
Focusing

Adam Wisniewski adamw523

🎯
Focusing
View GitHub Profile
This file has been truncated, but you can view the full file.
{"type":"FeatureCollection","metadata":{"generated":1375995645000,"url":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson","title":"USGS All Earthquakes, Past Week","status":200,"api":"1.0.9","count":1508},"features":[{"type":"Feature","properties":{"mag":1,"place":"10km WNW of Calipatria, California","time":1375995327400,"updated":1375995542623,"tz":-420,"url":"http://earthquake.usgs.gov/earthquakes/eventpage/ci11347002","detail":"http://earthquake.usgs.gov/earthquakes/feed/v1.0/detail/ci11347002.geojson","felt":null,"cdi":null,"mmi":null,"alert":null,"status":"AUTOMATIC","tsunami":null,"sig":15,"net":"ci","code":"11347002","ids":",ci11347002,","sources":",ci,","types":",general-link,geoserve,nearby-cities,origin,scitech-link,","nst":11,"dmin":0.00898315,"rms":0.03,"gap":79.2,"magType":"Ml","type":"earthquake"},"geometry":{"type":"Point","coordinates":[-115.605,33.1763,0.9]},"id":"ci11347002"},
{"type":"Feature","properties":{"mag":0.5,"place":"3km SE of The Geysers, California","tim
from Cocoa import *
from Foundation import NSObject
class SimpleXibDemoController(NSWindowController):
counterTextField = objc.IBOutlet()
def windowDidLoad(self):
NSWindowController.windowDidLoad(self)
# Start the counter
@adamw523
adamw523 / tunnel.thor
Created May 9, 2011 18:22
Expose your private port on a public server over SSH
class Tunnel < Thor
method_options :environment => "development", :aliases => "-e", :desc => "Config environment"
desc "start", "Start an ssh tunnel"
def start
random_hi_port = rand(30000) + 30000
identity_part = tunnel['identity_file'] ? "-i #{tunnel['identity_file']}" : ""
ssh_part = "ssh -t #{identity_part} -g -R *:#{random_hi_port}:0.0.0.0:#{tunnel['local_port']} #{tunnel['username']}@#{tunnel['public_host']}"