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 | |
require "optparse" | |
require "erb" | |
module Script | |
class Nginx | |
TEMP_PATH = "tmp/nginx.conf" | |
def initialize | |
@host = "0.0.0.0" |
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
(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
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
./configure --enable-shared --enable-pthread --enable-install-doc \ | |
--with-readline-dir=/usr/local CFLAGS=-D_XOPEN_SOURCE=1 |
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
curl -O http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p160.tar.gz | |
tar xzf ruby-1.8.7-p160.tar.gz | |
cd ruby-1.8.7-p160 | |
curl http://gist.github.com/98109.txt | patch -p0 | |
./configure --enable-shared --enable-pthread --enable-install-doc \ | |
CFLAGS=-D_XOPEN_SOURCE=1 | |
make | |
sudo make install |