Skip to content

Instantly share code, notes, and snippets.

View kevwil's full-sized avatar

Kevin Williams kevwil

View GitHub Profile
@kevwil
kevwil / weechat_console.log
Created May 20, 2013 19:22
homebrew/python/weechat problems
growl: dlopen(/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so, 2):
Symbol not found: __PyInt_AsInt
Referenced from: /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so
Expected in: flat namespace
in /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so
python: function "register" not found (or failed) in file "/Users/willkd9/dotfiles/weechat/python/autoload/growl.py"
python: stdout/stderr: Traceback (most recent call last):
python: stdout/stderr: File "/Users/willkd9/dotfiles/weechat/python/autoload/urlgrab.py", line 147, in <module>
python: stdout/stderr: import urllib
python: stdout/stderr: File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py",
@kevwil
kevwil / mydate.zsh
Created February 7, 2012 23:39
memoize a backticked system call result in zsh
my_date(){
readonly d="`date`" || echo "$d"
echo "$d"
}
# should always be the same result
print $(my_date)
sleep 2
print $(my_date)
sleep 2
print $(my_date)
@kevwil
kevwil / debug_output.txt
Created August 11, 2011 16:35
getSessionID not optional?
DEBUG: setting up form upload parsing ...
DEBUG: received message: { type: 'warning',
isupload: true,
msg: 'unable to retrieve session identifier, configuration parameter me.getSessionID must be a function!' }
/Volumes/code/git/fileservice/node_modules/formaline/lib/formaline.js:478
a( me.firstChunk, me.sendResponseToMultipart.bind( me, me.firstChunk.length )
^
TypeError: Cannot read property 'length' of null
at /Volumes/code/git/fileservice/node_modules/formaline/lib/formaline.js:478:113
@kevwil
kevwil / gist:249506
Created December 5, 2009 01:49
setup for @app.call errors
builder = Rack::Builder.new do
use Rack::CommonLogger
use Rack::Lint
use Rack::ShowExceptions
lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] }
use Rack::Lint
end
@app = builder.to_app
# pass app to server, server calls app and gets response
cd ~/tmp
mkdir gitsvnrebase
cd gitsvnrebase
svnadmin create fubar-repo
svn co file:///Users/sensei/tmp/gitsvnrebase/fubar-repo fubar-wc
git svn init file:///Users/sensei/tmp/gitsvnrebase/fubar-repo fubar-git
cd fubar-git
git svn fetch
cd ../fubar-wc
echo "hello from svn" > test.txt