Skip to content

Instantly share code, notes, and snippets.

View leepa's full-sized avatar

Lee Packham leepa

View GitHub Profile
# pip install pyftpdlib then rock n roll
from pyftpdlib import ftpserver
authorizer = ftpserver.DummyAuthorizer()
authorizer.add_user("ftpshiz", "ftpshiz", "/usr/local/ftp", perm="elradfmw")
handler = ftpserver.FTPHandler
handler.authorizer = authorizer
address = ("127.0.0.1", 2121)
ftpd = ftpserver.FTPServer(address, handler)
ftpd.serve_forever()
Don't ask why I'm pasting this here ;)
øøøøøøøøøø
Sampling localhost:6379 DB:0 with 1000 RANDOMKEYS
TYPES
=====
string: 993 (99.30%) set: 7 (0.70%)
EXPIRES
=======
unknown: 336 (33.60%) 1206979: 6 (0.60%) 1205926: 4 (0.40%)
24230: 4 (0.40%) 1205589: 3 (0.30%) 1209453: 3 (0.30%)
# Put me in .git/hooks/pre-commit for any Django projects you work on
# Make sure you have flake8 installed globally via 'pip install flake8'
ret_code=0
for file in $(git diff --name-only --cached $against)
do
if [ ! -z "$(grep 'DEBUGS' $file)" ]
then
echo "DEBUGS in file $file"
➜ ~ brew versions memcached
1.4.13 git checkout 4cbb3f4 /usr/local/Library/Formula/memcached.rb
1.4.11 git checkout c2b8e87 /usr/local/Library/Formula/memcached.rb
1.4.10 git checkout b177294 /usr/local/Library/Formula/memcached.rb
1.4.9 git checkout d8b226c /usr/local/Library/Formula/memcached.rb
1.4.7 git checkout 7665fdc /usr/local/Library/Formula/memcached.rb
1.4.6 git checkout a840c4a /usr/local/Library/Formula/memcached.rb
1.4.5 git checkout 0476235 /usr/local/Library/Formula/memcached.rb
1.4.4 git checkout f99f0b4 /usr/local/Library/Formula/memcached.rb
1.4.0 git checkout 2b9f56d /usr/local/Library/Formula/memcached.rb
ld: bad codegen, pointer diff in WebCore::JSDocument::JSDocument(JSC::Structure*, WebCore::JSDOMGlobalObject*, WTF::PassRefPtr<WebCore::Document>)to global weak symbol vtable for WebCore::JSDocumentfor architecture i386
➜ ~ zpool status
pool: smegdump
state: ONLINE
scrub: resilver completed after 7h29m with 0 errors on Thu Jul 28 02:04:46 2011
config:
NAME STATE READ WRITE CKSUM
smegdump ONLINE 0 0 0
raidz1 ONLINE 0 0 0
ad8 ONLINE 0 0 0
dmesg
ad12: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=2639631104
ad12: FAILURE - READ_DMA48 status=51<READY,DSC,ERROR> error=40<UNCORRECTABLE> LBA=2639631104
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176526450
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176526578
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176526706
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176510659
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176510915
ad12: FAILURE - WRITE_DMA48 status=61<READY,DMA_READY,ERROR> error=4<ABORTED> LBA=3176511171
@leepa
leepa / fixinstallnames.sh
Created May 11, 2011 14:57
If you want to use WebKit on a bundled app - you want to use this
install_name_tool -change @executable_path/../Frameworks/QtGui.framework/Versions/Current/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui <PutExecutableHere>
install_name_tool -change @executable_path/../Frameworks/QtNetwork.framework/Versions/Current/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/4/QtNetwork <PutExecutableHere>
install_name_tool -change @executable_path/../Frameworks/QtCore.framework/Versions/Current/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore <PutExecutableHere>
@leepa
leepa / symbolizecrashlog.sh
Created May 1, 2011 10:33
Probably the most important shell script for an iOS developer...
#!/bin/bash
AWK_SCRIPT=/tmp/symbolizecrashlog_$$.awk
SH_SCRIPT=/tmp/symbolizecrashlog_$$.sh
if [[ $# < 2 ]]
then
echo "Usage: $0 [ -arch <arch> ] symbol-file [ crash.log, ... ]"
exit 1
fi