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
// first use the jQuerify plugin here: http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet | |
$jq("tbody tr", $("#fs-0")).each(function(index, el){ | |
var nameTD = $jq("td.name", el); | |
var nameSpan = $jq("span", nameTD); | |
var name = nameSpan.attr("title") ? nameSpan.attr("title") : nameSpan.text(); | |
var deviceID = $jq("td.id", el).attr("title"); | |
console.log(name + '\t' + deviceID); | |
}) |
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
// placed in my applicationDidFinishLaunchingWithOptions | |
if(getenv("NSZombieEnabled") || getenv("NSAutoreleaseFreedObjectCheckEnabled")) | |
NSLog(@"NSZombieEnabled/NSAutoreleaseFreedObjectCheckEnabled enabled!"); |
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
/home/ubuntu/src/redis/redis/client.py in _execute_command | |
return self.parse_response(command_name, **options) ... | |
▼ Local vars | |
Variable Value | |
self | |
u'<redis.client.Redis object at 0xabbb02c>' |
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
set nocompatible | |
set autoindent | |
set si | |
set smartindent | |
set esckeys | |
" set highlight=8r,db,es,hs,mb,Mr,nu,rs,sr,tb,vr,ws | |
set magic |
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
==> Downloading http://download.osgeo.org/geos/geos-3.3.0.tar.bz2 | |
File already downloaded in /Users/mkrieger/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/mkrieger/Library/Caches/Homebrew/geos-3.3.0.tar.bz2 | |
==> ./configure --prefix=/usr/local/Cellar/geos/3.3.0 --disable-debug --disable-dependency-tracking | |
./configure --prefix=/usr/local/Cellar/geos/3.3.0 --disable-debug --disable-dependency-tracking | |
configure: WARNING: unrecognized options: --disable-debug | |
checking build system type... i386-apple-darwin11.0.0 | |
checking host system type... i386-apple-darwin11.0.0 | |
checking target system type... i386-apple-darwin11.0.0 |
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
@implementation NSNotification (KeyboardHeight) | |
- (CGFloat)keyboardHeight { | |
CGRect bounds; | |
NSValue *boundsValue = [self.userInfo objectForKey:UIKeyboardBoundsUserInfoKey]; | |
if (boundsValue) { | |
[boundsValue getValue:&bounds]; | |
return bounds.size.height; | |
} else { | |
return 0; |
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
def run_pg_fouine(): | |
info = host_info[env.host_string] | |
db_name = info.tags.get('Name') | |
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 0/" /etc/postgresql/9.*/main/postgresql.conf') | |
sudo('/etc/init.d/postgresql reload') | |
time.sleep(30) | |
sudo('perl -pi -e "s/log_min_duration_statement = .*/log_min_duration_statement = 500/" /etc/postgresql/9.*/main/postgresql.conf') | |
sudo('/etc/init.d/postgresql reload') | |
run('tail -n 100000 /var/log/postgresql/postgresql-9.*-main.log > /tmp/pgfouine.txt') | |
run('gzip -f /tmp/pgfouine.txt') |
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 boto.ses.connection import SESConnection | |
import sys | |
import subprocess | |
import socket | |
if __name__ == '__main__': | |
return_code = 'unknown' | |
host = socket.getfqdn() | |
try: |
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
""" Run with: | |
gunicorn -k gevent -b 0.0.0.0:8080 test_mc:app | |
or | |
gunicorn -k sync -b 0.0.0.0:8080 test_mc:app | |
""" | |
import memcache as memcache | |
# toggle to try pylibmc instead | |
# import pylibmc as memcache | |
client = memcache.Client(["127.0.0.1:11222", "127.0.0.1:11223"]) |