- account add jabber [email protected] 'PASSWORD'
- account hipchat set nick_source full_name
- account hipchat set resource bot
- account hipchat on
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
#!/bin/sh | |
FILES=$(git diff --cached --name-status | grep -v ^D | awk '$1 $2 { print $2}' | grep -e .py$) | |
if [ -n "$FILES" ]; then | |
pep8 -r $FILES | |
fi |
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
tutorial.build({ | |
// parent view | |
superview: this, | |
// screen name - used to get tutorial from data | |
type: "map_screen", | |
// milestone number - to identify tutorial | |
milestone: this._currentId, | |
// timeout for tutorial to start. | |
timeout: 1000, | |
// disable events to this view and sub view when tutorial is visible/processing |
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
{ | |
// screen | |
map_screen: { | |
// milestone number | |
1: [ | |
{ | |
id: 'milestone', | |
text: 'Welcome! Tap on Milestone-1 to start playing.' | |
}, | |
{ |
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
javascript:( | |
function() { | |
var document = window.frames.mainFrame.document, | |
fst = document.getElementById('fst').value, | |
snd = document.getElementById('snd').value; | |
document.getElementById('sum').value = parseInt(fst, 10) + parseInt(snd, 10); | |
} | |
)(); |
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
#!/bin/bash | |
# author: [email protected] | |
# Pre-commit hook passing files through jshint | |
# Temperory staging area | |
TMP_STAGING=".tmp_staging" | |
# absolute path of this repo | |
ROOT_DIR=$(git rev-parse --show-toplevel) | |
# path of your jshint config | |
CONF="--config=${ROOT_DIR}/tools/jshintrc" |
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 | |
# Author: Chris Eberle <[email protected]> | |
# Watch for any changes in a module or package, and reload it automatically | |
import pyinotify | |
import imp | |
import os | |
class ModuleWatcher(pyinotify.ProcessEvent): | |
""" |
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
http://cdimage.debian.org/debian-cd/6.0.6/i386/iso-cd/debian-6.0.6-i386-netinst.iso | |
http://mirror.ufs.ac.za/linuxmint//stable/14/linuxmint-14-cinnamon-dvd-64bit.iso | |
http://cdimage.debian.org/debian-cd/6.0.6/amd64/iso-dvd/debian-6.0.6-amd64-DVD-1.iso |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
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 BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
class ServerHandler(BaseHTTPRequestHandler): | |
def do_GET(self): | |
print "GET :",self.path | |
# Send success response | |
self.send_response(200) | |
self.send_header('Content-type','text/html') | |
self.end_headers() | |
# Return Data |
NewerOlder