Skip to content

Instantly share code, notes, and snippets.

View stephencelis's full-sized avatar

Stephen Celis stephencelis

View GitHub Profile
curl -O ftp://ftp.cwru.edu/pub/bash/readline-5.2.tar.gz
tar xzf readline-5.2.tar.gz
cd readline-5.2
./configure && make && sudo make install
./configure --enable-shared --enable-pthread --enable-install-doc \
--with-readline-dir=/usr/local CFLAGS=-D_XOPEN_SOURCE=1
# ~/.caprc
Dir["#{ENV['HOME']}/.recipes/*.rb"].each do |tasks|
load tasks
end
# ~/.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)
#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];
(0..9).map{rand(?z).chr[/[^_\W]/]||redo}*''
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"
# 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",
=== 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;
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