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
sdfsdfsdfsdfsdfsdfsdf |
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
use strict; | |
print "Hello World!\n"; |
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
# config.ru | |
require 'rubygems' | |
# Uncomment if your app uses bundled gems | |
#gems_dir = File.expand_path(File.join(File.dirname(__FILE__), 'gems')) | |
#Gem.clear_paths | |
#$BUNDLE = true | |
#Gem.path.unshift(gems_dir) | |
require 'merb-core' |
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
# this is the plugin lib | |
module ActsAsTraceable | |
class TracedClass | |
def initialize(object) | |
@object = object | |
end | |
def method_missing(method, *args, &block) | |
puts "[TRACE] START: #{@object.class.to_s}##{method}(#{args.map { |arg| arg.inspect }.join(', ')})" | |
@object.send(method, *args, &block) |
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 'yaml' | |
CONFIG_FN = ".git-wtfrc" | |
class Numeric; def pluralize s; "#{to_s} #{s}" + (self != 1 ? "s" : "") end end | |
def die s | |
$stderr.puts "Error: #{s}" | |
exit(-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
# ansi control sequences | |
BLACK="\[\033[0m\]" | |
BOLD_BLACK="\[\033[1;30m\]" | |
RED="\[\033[0;31m\]" | |
BOLD_RED="\[\033[1;31m\]" | |
GREEN="\[\033[0;32m\]" | |
BOLD_GREEN="\[\033[1;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
BOLD_YELLOW="\[\033[1;33m\]" | |
BLUE="\[\033[0;34m\]" |
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 'irb/completion' | |
require 'irb/ext/save-history' | |
IRB.conf[:SAVE_HISTORY] = 100 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
IRB.conf[:PROMPT_MODE] = :SIMPLE | |
require 'rubygems' | |
require 'wirble' | |
Wirble.init |
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
# ansi control sequences | |
BLACK="\[\033[0m\]" | |
BOLD_BLACK="\[\033[1;30m\]" | |
RED="\[\033[0;31m\]" | |
BOLD_RED="\[\033[1;31m\]" | |
GREEN="\[\033[0;32m\]" | |
BOLD_GREEN="\[\033[1;32m\]" | |
YELLOW="\[\033[0;33m\]" | |
BOLD_YELLOW="\[\033[1;33m\]" | |
BLUE="\[\033[0;34m\]" |
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
configuration do | |
application 'test-application' | |
path "/srv/app/test/#{application}" | |
repository '[email protected]:project.git' | |
tunnel true | |
end | |
target :staging do | |
branch 'staging' | |
app '[email protected]' |
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
validate_presence_of :name, :if => :should_validate_name? | |
def should_validate_name? | |
parent_object.has_certain_properties? | |
end |
OlderNewer