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()%7Bfunction%20makeParam(key,value)%7Bkey%3Descape(key)%3Bvalue%3Descape(value)%3Bvar%20clean_url%3Ddocument.location.href.split(%22%3F%22)%5B0%5D%3Bdocument.location.search%3D%27%3F%27%2Bkey%2B%27%3D%27%2Bvalue%3B%7Dvar%20username%3Dprompt(%22username%20to%20impersonate%22)%3BmakeParam(%27__impersonate%27,username)%3B%7D)()%3B |
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 | |
# shitty script to download bio lectures so I can watch them at 2x speed. | |
# Requires rtmpdump (http://rtmpdump.mplayerhq.hu/). Can install via homebrew | |
import subprocess | |
LECTURES = { | |
'dec': [3,5,7,10,12], | |
'nov': [2,5,7,9,14,16,19,21,26,30], |
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 bash | |
# | |
#Shitty script to create a ssh config entry for icloud | |
HOSTNAME=$(echo show Setup:/Network/BackToMyMac | scutil | egrep "[0-9]{1,}.members.btmm.icloud.com" -o) | |
COMPUTER_NAME=$(scutil --get ComputerName) | |
RED=$(tput setaf 9) | |
RESET=$(tput sgr0) |
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 django.conf import settings | |
from django.conf.urls.defaults import patterns, url | |
import os | |
urlpatterns = patterns('',) | |
if settings.DEBUG: | |
urlpatterns += patterns('', | |
url(r'^(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.getcwd()}) | |
) |
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
class app.view.ProfileListView extends Backbone.View | |
events: | |
"click li.js_profile": "select_click_person" | |
"click li.js_next_page": "next_page" | |
"click li.js_prev_page": "prev_page" | |
"click .close": "filter_x_click" | |
"click .order_buttons button": "order_by" | |
initialize: -> | |
@loading_overlay_el = $('#js_overlay_'+@options.name) |
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
insert('This is a line added by the user. \n This is another line added by the user.', A, B) | |
insert('This is yet another line added by the user.' B, null) |
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
import time | |
def log_timing(func): | |
def wrapper(*arg): | |
t1 = time.time() | |
res = func(*arg) | |
t2 = time.time() | |
print "%s took %d ms" % (func.func_name, (t2-t1)*1000.0) | |
return res | |
return wrapper |
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
Ext.util.Observable.prototype.fireEvent = | |
Ext.createInterceptor(Ext.util.Observable.prototype.fireEvent, function() { | |
console.log(this.name); | |
console.log(arguments); | |
return true; | |
}); |
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 | |
### BEGIN INIT INFO | |
# Provides: gunicorn | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the gunicorn server | |
# Description: starts gunicorn using start-stop-daemon |
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
/* HTML5 ✰ Boilerplate | |
* ==|== normalize ========================================================== | |
*/ | |
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } | |
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } | |
audio:not([controls]) { display: none; } | |
[hidden] { display: none; } | |
html { font-size: 100%; overflow-y: scroll; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } |