This file contains hidden or 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 | |
# | |
# mongrel_process_memory - A munin plugin to monitor memory size of | |
# each individual mongrel process | |
# Copyright (C) 2007 Ben VandenBos and Avvo, Inc. | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License version 2 | |
# as published by the Free Software Foundation. | |
# |
This file contains hidden or 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 | |
# | |
# mongrel_process_memory - A munin plugin to monitor memory size of | |
# each individual mongrel process | |
# Copyright (C) 2007 Ben VandenBos and Avvo, Inc. | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License version 2 | |
# as published by the Free Software Foundation. | |
# |
This file contains hidden or 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
CREATE USER 'backup'@'localhost'; | |
GRANT SELECT, LOCK TABLES ON *.* TO 'backup'@'localhost'; |
This file contains hidden or 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. Create and checkout local development branch | |
You've probably done this already. | |
git checkout master # now on master | |
git checkout -b development origin/development # track remote dev branch | |
== 1. Adding features for bug 12000 | |
This is optional, but highly encouraged. You can just develop right on your |
This file contains hidden or 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 'rack/hoptoad_notifier' | |
use Rack::HoptoadNotifier do |config| | |
config[:api_key] = 'XXXXXXXX' | |
end |
This file contains hidden or 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 'ostruct' | |
module Configurable | |
def config | |
@config ||= OpenStruct.new | |
yield @config if block_given? | |
end | |
def respond_to?(sym) | |
@config.respond_to?(sym) || super(sym) | |
end |
This file contains hidden or 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
class User < ActiveRecord::Base | |
include ValidationContexts | |
validation_context :default, :signup do | |
validates_uniqueness_of :email, :allow_blank => true | |
validates_presence_of :email | |
end | |
validation_context :signup do | |
validates_confirmation_of :password |
This file contains hidden or 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 -v | |
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.8.0] | |
$ rake -v | |
(in /Users/dstrelau/proj) | |
/Users/dstrelau/.rvm/ruby-1.8.6-p369/bin/ruby -I"lib:test" | |
[...] |
This file contains hidden or 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
[~] rvm install 1.8.6 -d | |
++ which curl | |
+ rvm_curl=/usr/bin/curl | |
+ '[' 0 -ne 0 ']' | |
+ rvm_curl='/usr/bin/curl -O -L -s' | |
+ '[' -z '' -a -z 1.8.6 ']' | |
+ rvm_implementation=ruby | |
+ niceness=0 | |
++ whoami | |
+ '[' dstrelau = root ']' |
This file contains hidden or 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 env | |
RubyGems Environment: | |
- GEM PATHS: | |
- /Users/dstrelau/.gem/ruby/1.8.7 | |
- /Users/dstrelau/.gem/ruby/1.8 | |
- /Users/dstrelau/.rvm/ruby-1.8.7-p174/lib/ruby/gems/1.8 | |
[~] rvm use 1.8.7 | |
[~] gem env | |
RubyGems Environment: | |
- GEM PATHS: |