View xmpp-growl.tac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.words.protocols.jabber import client, jid | |
from twisted.words.xish import domish, xmlstream | |
from twisted.application import internet, service | |
# Python bindings for Growl come with the SDK: | |
# http://growl.info/downloads_developers.php | |
from Growl import GrowlNotifier, Image | |
JID = 'test@example.com' | |
PASSWORD = 'secret' |
View domdori-redirect.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
from twisted.internet import reactor | |
from twisted.web.server import Site, NOT_DONE_YET | |
from twisted.web.resource import Resource | |
from twisted.python import log | |
from twisted.names import client | |
from optparse import OptionParser | |
class RedirectResource(Resource): |
View gist:212586
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.python import log | |
from twisted.internet import reactor, protocol | |
from twisted.protocols.basic import LineReceiver | |
import sys | |
import simplejson | |
GAME_PORT = 3333 | |
class GameProtocol(LineReceiver): | |
delimiter = "\n" |
View gist:247064
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
get('/memory') { `ps u 30323`.split("\n").last.split(' ')[3] } | |
get('/cpu') { `uptime`.split(' ')[-3].gsub(',','') } |
View launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from subprocess import call | |
import sys, os, time | |
# TODO: ssh connect, find key | |
# TODO: options | |
# TODO: specify and set user data (hostname, ip, mounts) | |
CMD_PREFIX = 'euca' | |
CMD_SILENT = False |
View webstreamr.tac
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from twisted.application import internet, service | |
from twisted.web import server | |
from twisted.internet.defer import DeferredQueue | |
from twisted.web.resource import Resource | |
from twisted.internet import protocol | |
import simplejson | |
PORT = 80 | |
listeners = {} |
View engine.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import with_statement | |
import base64 | |
import PyV8 | |
import time | |
from twisted.application import service, internet | |
from twisted.web import server, resource, client | |
class EvalResource(resource.Resource): |
View v8ssjsconsole.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from __future__ import with_statement | |
import base64 | |
import PyV8 | |
import time | |
from twisted.application import service, internet | |
from twisted.web import server, resource, client | |
from urllib import unquote | |
import simplejson |
View gist:251329
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WARNING: Beware of magic beyond just variable replacement. | |
# See Rakefile task that uses this file for details. | |
# Macros | |
Include <root>/config/macros.conf | |
# SVN | |
Include <root>/projects/svn.conf | |
# Site |
View ShortNet Session 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SERVICE MODULES and default/suggested mount point: (mount points are like ports) | |
- wiki # | |
- task queue * | |
- command line ! | |
- twitter gateway @ | |
- auction $ | |
- voting % (its a scale? wow) | |
- review & | |
Command metasyntax: |
OlderNewer