Skip to content

Instantly share code, notes, and snippets.

View adelcambre's full-sized avatar

Andy Delcambre adelcambre

View GitHub Profile
class Instance
include DataMapper::Resource
class Adapter < AbstractAdapter
# define CRUD
end
repository DataMapper.setup(Adapter.new)
property :id
# etc, etc
diff -Nru passenger-2.2.0.orig/bin/passenger-install-nginx-module passenger-2.2.0/bin/passenger-install-nginx-module
--- passenger-2.2.0.orig/bin/passenger-install-nginx-module 2009-04-16 10:42:11.000000000 -0700
+++ passenger-2.2.0/bin/passenger-install-nginx-module 2009-04-16 12:07:31.000000000 -0700
@@ -62,6 +62,13 @@
check_write_permission_to_passenger_root || exit(1)
download_and_install = should_we_download_and_install_nginx_automatically?
+ if download_and_install == 3
+ compile_passenger_support_files
+ show_passenger_configure_line(build_nginx_configure_command("/opt/nginx"))
/* Expanded form of a bookmarklet for extracting rev=canonical OR tinyurling a page */
(function(){
var url=document.location;
var links=document.getElementsByTagName('link');
var found=0;
for(var i = 0, l; l = links[i]; i++) {
if (l.getAttribute('rev') == 'canonical' || (/alternate short/).exec(l.getAttribute('rel'))) {
found=l.getAttribute('href');
break;
}
class Collector
@@dependencies = []
def self.collect(str)
collector = new
collector.instance_eval(str)
collector
end
def initialize
define :foobar do
execute "something" do
command "rm -rf #{params[:name]}"
end
end
foobar "/" do
only_if { false }
end
hiro➤ file vendor/gems/gems/nokogiri-1.3.3/ext/nokogiri/nokogiri.bundle
vendor/gems/gems/nokogiri-1.3.3/ext/nokogiri/nokogiri.bundle: Mach-O 64-bit bundle x86_64
hiro➤ uname -m
i386
1 + 2 = 3
require 'foo'
1 + 2 = 3
# DO NOT MODIFY THIS FILE
module Bundler
file = File.expand_path(__FILE__)
dir = File.dirname(file)
ENV["GEM_HOME"] = dir
ENV["GEM_PATH"] = dir
ENV["PATH"] = "#{dir}/../bin:#{ENV["PATH"]}"
ENV["RUBYOPT"] = "-r#{file} #{ENV["RUBYOPT"]}"