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
# Adapted from http://blogs.sun.com/Jacobkessler/entry/capistrano_and_glassfish_now_with | |
namespace :deploy do | |
desc "Start Glassfish Gem from a shutdown state" | |
task :cold do | |
start | |
end | |
desc "Stop a server running Glassfish Gem" | |
task :stop do |
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
# an example Monit configuration file for delayed_job | |
# | |
# To use: | |
# 1. copy to /var/www/apps/{app_name}/shared/delayed_job.monitrc | |
# 2. replace {app_name} and {environment} as appropriate | |
# 3. add this to your /etc/monit/monitrc | |
# | |
# include /var/www/apps/{app_name}/shared/delayed_job.monitrc | |
check process delayed_job with pidfile /var/www/apps/{app_name}/shared/pids/delayed_job.pid |
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
; Enable Vimpulse | |
(setq viper-mode t) ; enable Viper at load time | |
(setq viper-ex-style-editing nil) ; can backspace past start of insert / line | |
(require 'viper) ; load Viper | |
(setq vimpulse-experimental nil) ; don't load bleeding edge code (see 6. installation instruction) | |
(require 'vimpulse) ; load Vimpulse | |
(setq woman-use-own-frame nil) ; don't create new frame for manpages | |
(setq woman-use-topic-at-point t) ; don't prompt upon K key (manpage display) | |
(require '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
# mongo_template.rb | |
# remove unneeded defaults | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/javascripts/controls.js" | |
run "rm public/javascripts/dragdrop.js" | |
run "rm public/javascripts/effects.js" | |
run "rm public/javascripts/prototype.js" |
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
## From http://shanesbrain.net/2008/7/9/using-xcode-with-git | |
# Treat stuff in the project folder as binary | |
*.pbxproj -crlf -diff -merge |
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
Spec::Matchers.define :intersect_with do |challenge_range| | |
# Check to see if any elements exist in the intersection | |
match do |current_range| | |
[current_range.to_a & challenge_range.to_a].flatten.any? | |
end | |
failure_message_for_should do |current_range| | |
"#{current_range.inspect} doesn't overlap with #{challenge_range.inspect}" | |
end |
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
// e.g.... | |
var MyObject = exports.MyObject = function () { | |
this.my_attr = "I'm an attribute!"; | |
} | |
// I expected to do this... | |
var MyObject = require('my_object'); | |
var my_instance = new MyObject(); // EXPLOSIONS!!! |
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
# A sample class... | |
class Person | |
attr_accessor :name, :gender, :born_on | |
def initialize(name, age, born_on) | |
self.name = name | |
self.gender = gender | |
self.born_on = born_on | |
end |