start new:
tmux
start new with session name:
tmux new -s myname
require 'pry' | |
require 'rubygems' | |
require 'google/api_client' | |
passPhrase = "notasecret" | |
keyFile = "YOUR KEY HERE-privatekey.p12" | |
cID = "YOUR ID HERE.apps.googleusercontent.com" | |
scope = 'https://www.googleapis.com/auth/analytics.readonly' | |
profileID = "YOUR PROFILE ID" | |
email = '[email protected]' |
""" | |
Bridge test client: | |
So this one's going to be a doozy. | |
Connect to target via SSH and then connect to target:localhost:8283(DAVE) and listen | |
for the time messages. | |
""" |
def str2tel(word): | |
n2a = {2: 'abc', 3: 'def', 4: 'ghi', 5: 'jkl', 6: 'mno', 7: 'pqrs', 8: 'tuv', 9: 'wxyz'} | |
for t in word: | |
for k,i in n2a.items(): | |
if t in i: print k, |
class ReloaderEventHandler(FileSystemEventHandler): | |
""" | |
Listen for changes to modules within the Django project | |
On change, reload the module in the Python Shell | |
Custom logic required to reload django models.py modules | |
Due to the singleton AppCache, which caches model references. | |
For those models files, we must clear and repopulate the AppCache | |
""" | |
def __init__(self, *args, **kwargs): |
import time | |
import zmq | |
from zmq.eventloop import ioloop | |
from zmq.eventloop.zmqstream import ZMQStream | |
from dgbase.messages.kickstart import RequestKickstart | |
from dgbase.messages.kickstart import RespondWithKickstart | |
from functools import wraps, partial |
message KickStartRequest { | |
enum WHOTYPE { | |
CLIENT = 0; | |
PRODUCER = 1; | |
HUB = 2; | |
CLIHUB = 3; | |
} | |
optional WHOTYPE whoami = 1 [default = CLIENT]; | |
} |
if (!Function.prototype.bind) { | |
Function.prototype.bind = function (oThis) { | |
if (typeof this !== "function") { | |
// closest thing possible to the ECMAScript 5 internal IsCallable function | |
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | |
} | |
var aArgs = Array.prototype.slice.call(arguments, 1), | |
fToBind = this, | |
fNOP = function () {}, |
/* | |
* File: main.cpp | |
* Author: dward | |
* | |
* Created on March 8, 2013, 8:13 AM | |
*/ | |
#include <cstdlib> | |
#include <iostream> |
""" | |
requires the AWS ec2 command line tools are setup | |
run this from the base directory of the ec2-tools install directory | |
security groups provided by DotCloud | |
""" | |
groups = """admin-282171928639, gateway-282171928639, lxc-282171928639 | |
admin-557344332487, gateway-557344332487, lxc-557344332487 |