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
From a7b7aec29c5ac203c4f85d68fb9139fa05718107 Mon Sep 17 00:00:00 2001 | |
From: Dane Jensen <dane.jensen@gmail.com> | |
Date: Fri, 19 Feb 2010 11:29:35 -0800 | |
Subject: [PATCH 1/2] extconf.rb: hack arch for 32-bit karmic | |
--- | |
ext/extconf.rb | 5 ++++- | |
1 files changed, 4 insertions(+), 1 deletions(-) | |
diff --git a/ext/extconf.rb b/ext/extconf.rb |
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
require 'rubygems' | |
require 'mq' | |
EM.error_handler {|e| | |
p [:exception, e] | |
if e.kind_of? AMQP::Error | |
EM.add_timer(1) { | |
AMQP.conn.reconnect | |
} | |
end |
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
/ I'm horizontally scalable and naturally \ | |
\ concurrent. / | |
----------------------------------------- | |
\ | |
\ \ | |
\ /\ | |
( ) | |
.( o ). |
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 | |
forbidden = ["~","~/Desktop"].collect { |path| File.expand_path path } | |
target = File.expand_path ARGV[0] | |
if forbidden.include? target | |
puts "You don't REALLY want to open #{target} in TextMate, do you?" | |
exit 1 | |
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
require 'rubygems' | |
require 'sinatra/async' | |
require 'memcached' | |
cache = Memcached.new("localhost:11211") | |
cache.set "test:Action:/delay/30", "NOT delayed for 30 seconds" | |
class AsyncTest < Sinatra::Base | |
register Sinatra::Async |
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
module Chainable | |
# Specify a block to be executed if and when the Deferrable object receives | |
# a status of :succeeded. See #set_deferred_status for more information. | |
# | |
# Calling this method on a Deferrable object whose status is not yet known | |
# will cause the callback block to be stored on an internal list. | |
# If you call this method on a Deferrable whose status is :succeeded, the | |
# block will be executed immediately, receiving the parameters given to the | |
# prior #set_deferred_status call. | |
# |
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
require 'uri' | |
require 'rubygems' | |
require 'fiber' | |
require 'eventmachine' | |
require 'em-http' | |
#require 'net/http' | |
#require "rest_client" |
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
ERL_LIBS=/Library/Erlang/lib | |
if [ -d $HOME/Library/Erlang/lib ]; then | |
ERL_LIBS=$HOME/Library/Erlang/lib:$ERL_LIBS | |
fi | |
export ERL_LIBS | |
export CAPP_BUILD=$HOME/Library/JavaScript/Cappuccino | |
export JAVA_HOME=$(/usr/libexec/java_home) |
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
└─(1::01:01:%)── MAGLEV_OPTS="-d -MtraceLoad" maglev-gem install sinatra ──(Thu,Dec03)─┘ | |
_____________________________________________________________________________ | |
| Configuration Files | | |
| | | |
| System File: /Users/djensen/Source/Ruby/maglev/etc/system.conf | | |
| | | |
| Executable File: /Users/djensen/gem.conf | | |
| Warning: File not found (errno=2,ENOENT, The file or directory specified cannot | |
| be found) | | |
| using defaults. | |
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
#include <CoreServices/CoreServices.h> | |
static void mycallback(ConstFSEventStreamRef streamRef, void *clientCallBackInfo, size_t numEvents, void *eventPaths, | |
const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId eventIds[]) { | |
int i; | |
char **paths = eventPaths; | |
for (i=0; i<numEvents; i++) { | |
/* flags are unsigned long, IDs are uint64_t */ | |
printf("Change %llu in %s, flags %lu\n", eventIds[i], paths[i], eventFlags[i]); |