stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')
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
""" | |
Tasks for managing a test server | |
""" | |
import os | |
from fabric.api import cd, env, prefix, run, sudo, task | |
from fabric.contrib.files import exists, sed | |
from fabric.context_managers import hide | |
from fabric.colors import green, red | |
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
[My initial list:] | |
DRM | |
speed for superhi-perf games | |
app store placement | |
source-code secrecy | |
[list compiled from other people's twitter answers; thanks all!] | |
pushing native notifications when they're not in the "app" (several people said this) |
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 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): |
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
function whichTransitionEvent(){ | |
var t; | |
var el = document.createElement('fakeelement'); | |
var transitions = { | |
'transition':'transitionend', | |
'MSTransition':'msTransitionEnd', | |
'MozTransition':'transitionend', | |
'WebkitTransition':'webkitTransitionEnd' | |
} |
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
/* | |
Grep.js | |
Author : Nic da Costa ( @nic_daCosta ) | |
Created : 2012/11/14 | |
Version : 0.2 | |
(c) Nic da Costa | |
License : MIT, GPL licenses | |
Overview: | |
Basic function that searches / filters any object or function and returns matched properties. |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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 | |
""" | |
Highlight stdin using pygments and output to stdout | |
Re-uses httpie. | |
Auto-detects the input language. | |
Will not colorize if piped into something else. |
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 python2.7 | |
import time | |
_URL = 'http://localhost/tmp/derp.html' | |
_NUMBER = 1000 | |
def test_urllib2(): | |
import urllib2 |
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
! urxvt | |
URxvt*buffered: true | |
URxvt*cursorBlink: true | |
URxvt*underlineColor: yellow | |
URxvt*font: xft:inconsolata:size=10:antialias=true | |
URxvt*depth: 32 | |
URxvt*borderless: 1 | |
URxvt*scrollBar: false | |
URxvt*loginShell: true | |
Urxvt*secondaryScroll: true # Enable Shift-PageUp/Down in screen |
NewerOlder