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
# Bare bones Gemfile for Rails 3.0.pre. | |
# | |
# Throw in a directory for a new application, `gem bundle && bin/rails . -s`. | |
gem "rails", "3.0.pre", :git => "git://github.com/rails/rails.git" | |
gem "arel", :git => "git://github.com/rails/arel.git" | |
gem "rack-mount", :git => "git://github.com/rails/rack-mount.git" |
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
#!/bin/sh | |
# A better open: with stdin. | |
if tty -s | |
then | |
/usr/bin/open $@ | |
else | |
while read input | |
do | |
/usr/bin/open $input | |
done |
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
svn co http://rubycocoa.svn.sourceforge.net/svnroot/rubycocoa/trunk/src | |
cd src | |
ruby install.rb config --build-universal=no | |
ruby install.rb setup | |
sudo ruby install.rb install |
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
=== ruby.h | |
================================================================== | |
--- ruby.h (/trunk) (revision 16) | |
+++ ruby.h (/branches/thread-hooks) (revision 16) | |
@@ -724,6 +724,19 @@ | |
void ruby_native_thread_kill _((int)); | |
#endif | |
+ | |
+typedef unsigned int rb_threadswitch_event_t; |
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
# App (http://github.com/stephencelis/app), a template for Rails: | |
# | |
# In existing projects: | |
# % rake rails:template LOCATION=http://gist.github.com/97629.txt | |
# | |
# For new projects: | |
# % rails newapp -m http://gist.github.com/97629.txt | |
unless File.read("config/environment.rb").include? "stephencelis-app" | |
gem "stephencelis-app", :lib => "app", |
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 "haddock" | |
Haddock::Password.generate # => "bowl9&bracky" | |
include Haddock # (Make things easier on our fingers...) | |
Password.generate(30) # => "Phlebotomus2473?nonconditioned" | |
Password.generate(8) # => "amy7@rax" |
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
(0..9).map{rand(?z).chr[/[^_\W]/]||redo}*'' |
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
#import "SCListener.h" // Remember to link to AudioToolbox.framework. | |
// Start listening. | |
[[SCListener sharedListener] listen]; | |
// Retrieve the average power. | |
[[SCListener sharedListener] averagePower]; | |
// Retrieve the peak power. | |
[[SCListener sharedListener] peakPower]; |
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
# ~/.recipes/growl.rb | |
set :stage, nil unless defined? stage | |
namespace :growl do | |
task :notify do | |
growl_send(ENV["GROWL_MESSAGE"] || "wants your attention") | |
end | |
task :alert do | |
growl_send(ENV["GROWL_MESSAGE"] || "needs your attention", 2) |
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
# ~/.caprc | |
Dir["#{ENV['HOME']}/.recipes/*.rb"].each do |tasks| | |
load tasks | |
end |