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
module Sanitizer | |
def self.included(base) | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def sanitizes(method_names) | |
method_names.each do |new_method_name| | |
old_method_name = :"#{method_name}_with_sanitization" | |
alias_method old_method_name, new_method_name |
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 'rubygems' | |
class Board | |
attr_reader :number | |
def initialize(n) | |
@number = n | |
@array = board(@number) | |
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
# /etc/init/delayed_job.conf | |
# Note that you have to modify script/delayed_job's shebang line to have the correct ruby path | |
description "Delayed_job for a Rails app" | |
author "Brent Miller <foliosus@foliosus.com>" | |
start on started mysql | |
stop on stopping mysql |
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
#!bash | |
# | |
# bash completion support for core Git. | |
# | |
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> | |
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# The contained completion routines provide support for completing: | |
# |
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 = {} | |
ANSI[:RESET] = "\e[0m" | |
ANSI[:BOLD] = "\e[1m" | |
ANSI[:UNDERLINE] = "\e[4m" | |
ANSI[:LGRAY] = "\e[0;37m" | |
ANSI[:GRAY] = "\e[1;30m" | |
ANSI[:RED] = "\e[31m" | |
ANSI[:GREEN] = "\e[32m" | |
ANSI[:YELLOW] = "\e[33m" | |
ANSI[:BLUE] = "\e[34m" |