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
pushd ~/code/project | |
git remote add jungledisk /Volumes/JungleDisk/Git/project.git | |
git push --all jungledisk |
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
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$.ajax({ | |
type: 'POST', | |
url: 'http://localhost:5984/andrewfun', | |
contentType: "application/json", | |
data: '{"foo":"bar"}', |
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
#/etc/apache2/httpd.conf | |
# | |
... | |
# | |
# Proxy Server directives. | |
# | |
<IfModule mod_proxy.c> | |
ProxyRequests On |
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
# Thanks to the Same Origin Policy, with CouchDB running port 5984, the browser will reject | |
# requests made to the database. | |
# | |
# Configure the CouchDB backend to communicate on port 80 by setting up Apache as a reverse proxy. | |
# thanks to http://www.syamantics.com/talk-to-your-couchdb-backend-directly-from-javascript | |
# in /etc/apache2/httpd.conf on Snow Leopard | |
<VirtualHost *:80> | |
ProxyRequests Off | |
<Proxy *> |
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
print "You have no mail.\n" | |
10000.times { | |
'$ '.display | |
gets.each do | e | | |
if (e == "uname\n") | |
puts "Runix 1.0" | |
elsif (e == "halt\n") | |
exit | |
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
This is a test of the emacs gist mode |
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
~/code/activemessaging_fun$ ./script/poller run | |
ActiveMessaging: adapter reliable_msg not loaded: no such file to load -- reliable-msg | |
ActiveMessaging: adapter wmq not loaded: no such file to load -- wmq/wmq | |
"/Users/andrew/code/activemessaging_fun" | |
"/Users/andrew/code/activemessaging_fun/config/messaging.rb" | |
ActiveMessaging: Loading /Users/andrew/code/activemessaging_fun/app/processors/application.rb | |
ActiveMessaging: Loading /Users/andrew/code/activemessaging_fun/app/processors/hello_world_processor.rb | |
=> Subscribing to /queue/HelloWorld (processed by HelloWorldProcessor) | |
connect to localhost failed: Connection refused - connect(2) will retry(#0) in 5 |
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 ruby -wKU | |
plist_path = ENV['HOME'] + '/Library/LaunchAgents/com.blacktree.quicksilver.plist' | |
plist_content = <<-EOS | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> |
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
> tig | |
command not found: tig | |
> brew install tig | |
==> Downloading http://jonas.nitro.dk/tig/releases/tig-0.15.tar.gz | |
######################################################################## 100.0% | |
==> ./configure --disable-debug --prefix=/usr/local/homebrew/Cellar/tig/0.15 | |
==> make install | |
/usr/local/homebrew/Cellar/tig/0.15: 3 files, 164K, built in 6 seconds |
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
# thanks Hans | |
module ActiveRecord | |
class Base | |
def self.random | |
if (c = count) != 0 | |
find(:first, :offset =>rand(c)) | |
end | |
end | |
end |