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/lib/ruby/gems/1.8/gems/mongrel-1.1.5.1/lib/mongrel/configurator.rb | |
# Writes the PID file if we're not on Windows. | |
def write_pid_file | |
if RUBY_PLATFORM !~ /mswin/ | |
log "Writing PID file to #{@pid_file}" | |
open(@pid_file,"w") {|f| f.write(Process.pid) } | |
open(@pid_file,"w") do |f| | |
f.write(Process.pid) | |
File.chmod(0644, @pid_file) |
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
Add to ~/.gitconfig | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green |
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
Come see my teammate Derek Collison talk about the PaaS we've been building at VMware | |
http://www.rubyconf.org/presentations/8 | |
⚡ $ vmc -h | |
version # version | |
help, -h # show usage |
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
(master) % vmc apps | |
No applications available. | |
(master) % ls | |
foo.rb | |
(master) % cat foo.rb | |
require 'rubygems' | |
require 'sinatra' | |
get '/' do | |
host = ENV['VMC_APP_HOST'] |
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
server { | |
listen 81 default; | |
server_name _; | |
rewrite ^(.*)$ https://www.domain.com$1; | |
} | |
# no need to redirect https, it's already https |
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
Aquarius:tmp krutten$ rvm info | |
system: | |
system: | |
uname: "Darwin Aquarius.local 10.5.0 Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386" | |
zsh: "zsh 4.3.9 (i386-apple-darwin10.0)" | |
bash: "GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)" | |
rvm: | |
version: "rvm 1.0.1 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]" |
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
gem "capybara", ">= 0.3.8", :group => [:test, :cucumber] | |
gem "cucumber-rails", ">= 0.3.2", :group => [:test, :cucumber] | |
gem "database_cleaner", ">= 0.5.2", :group => [:test, :cucumber] | |
gem "haml-rails", ">= 0.0.2" | |
gem "launchy", ">= 0.3.5", :group => [:test, :cucumber] | |
gem "rspec-rails", ">= 2.0.0.beta.20", :group => [:test, :cucumber] | |
gem "spork", ">= 0.8.4", :group => [:test, :cucumber] | |
gem "devise" | |
gem "hpricot" | |
gem "ruby_parser" |
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
# Cleaning up and extending the Gemfile | |
remove_file 'Gemfile' | |
create_file 'Gemfile', <<-GEMFILE | |
source 'http://rubygems.org' | |
gem 'rails', '3.0.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3-ruby', :require => 'sqlite3' |
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
# You must require this file in application.rb, above the Application | |
# definition, for this to work. For example: | |
# | |
# # Syslog-like Rails logs | |
# if Rails.env.production? | |
# require File.expand_path('../../lib/better_logger', __FILE__) | |
# end | |
# | |
# module MyApp | |
# class Application < Rails::Application |
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 bash | |
(bundle check || bundle --local) && bundle exec "$@" |
OlderNewer