Skip to content

Instantly share code, notes, and snippets.

View 140am's full-sized avatar

Manuel Kreutz 140am

View GitHub Profile
@140am
140am / core.js
Created November 30, 2011 23:16
SC 1.x routing / statechart example
TestApp = SC.Application.create(
/**
Invoked when route change has been detected
*/
routeDidChange: function(params) {
if (!params.target) return NO;
params = SC.clone(params);
@140am
140am / observer.py
Created June 18, 2011 08:35
python observer pattern example
import pdb
import time
import threading
class Event(object):
pass
class Observable(object):
def __init__(self):
self.callbacks = []
@140am
140am / shimo_vpn.py
Created December 3, 2010 17:24
monitors an VPN connection and controls OSX Shimo.app in case of problems
#!/usr/bin/python
# OSX VPN monitor
#
# requires:
# - http://www.chungwasoft.com/shimo/
# - http://growl.info/
# - http://appscript.sourceforge.net/
import sys
import socket
@140am
140am / gist:563342
Last active August 12, 2016 22:38
print SQL CREATE from "sqlalchemy" DB tables
>>> from sqlalchemy.schema import CreateTable
>>> print CreateTable(model.TrafficLog.__table__)