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
humm? |
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
888 |
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
class Truco | |
NAIPES = %w{Ouro Copas Espada Paus} | |
SPECIALS = %w{Zap SeteCopas Espadilha SeteOuro} | |
VALUES = %w{3 2 A K J Q 7 6 5 4} | |
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
class String | |
ACCIDENTS = { | |
:a => %w{ ã á â }, | |
:e => %w{ é ê }, | |
:i => %w{ í }, | |
:o => %w{ õ ó ô }, | |
:u => %w{ ú }, | |
:c => %w{ ç } | |
} | |
def to_ascii |
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
def <=>(other) | |
raise("Comparing a revision to #{other.class} is not supported") unless other.is_a? Revision | |
@number <=> other.number | |
end | |
# from cruisecontrol code... | |
# ruby = poem |
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 'activesms' | |
class Noter < ActiveSms::Base | |
def emaio | |
@delivery = :email | |
@carrier = 'tim' | |
@recipients = '55555555' | |
@from = '' | |
@body = "Hello" |
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 Compile | |
def self.c | |
system "ruby ext/extconf.rb && cd ext && make" | |
end | |
end | |
class Autotest | |
Autotest.add_hook :ran_command do |a| | |
Compile::c | |
end | |
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
module SubtitleIt | |
module Sub2Srt | |
def Sub2Srt.convert(filename) | |
framerate = 23.976 | |
infile = File.open(filename,'r') | |
read_mode = 0 | |
for line in inn do |line| | |
line.strip! |
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
Autotest.add_hook :initialize do |at| | |
at.clear_mappings | |
at.add_mapping(%r{^spec/.+_spec\.rb$}) do |filename,_| | |
filename | |
end | |
at.add_mapping(%r{^lib/< project folder!! >/(.+)\.rb$}) do |_,match| | |
[ "spec/< project folder!!!! >/#{match[1]}_spec.rb" ] + | |
at.files_matching(%r{^spec/integration/.+_spec\.rb$}) |
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
# # | |
# CAPISTRANO 2.5.0 DEPLOY | |
# GIT, Passenger, BackgrounDRB, Juggernaut | |
# | |
# Workflow: | |
# cap <stage> <task> | |
# cap <stage> deploy:setup | |
# cap <stage> deploy:cold | |
# . . . | |
# cap <stage> deploy |
OlderNewer