Skip to content

Instantly share code, notes, and snippets.

View nofxx's full-sized avatar
🍺
Drinking

Marcos Piccinini nofxx

🍺
Drinking
View GitHub Profile
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!
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
require 'activesms'
class Noter < ActiveSms::Base
def emaio
@delivery = :email
@carrier = 'tim'
@recipients = '55555555'
@from = ''
@body = "Hello"
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
class String
ACCIDENTS = {
:a => %w{ ã á â },
:e => %w{ é ê },
:i => %w{ í },
:o => %w{ õ ó ô },
:u => %w{ ú },
:c => %w{ ç }
}
def to_ascii
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
humm?