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' | |
require 'eventmachine' | |
##require 'lib/environment' # here we go again! | |
EM.kqueue = true if EM.kqueue? # file watching requires kqueue on OSX | |
class Example < EM::Connection | |
def receive_data(data) | |
#BlockConn.fila.size+1 | |
Example.queue.push "#{data}" |
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
# Ruby 1.9 | |
require 'rubygems' | |
require 'eventmachine' | |
##require 'lib/environment' # here we go again! | |
##require 'sequel' | |
EM.kqueue = true if EM.kqueue? # file watching requires kqueue on OSX | |
module Example < EM::Connection | |
def receive_data(data) |
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 Customer < ActiveRecord::Base | |
has_many :projects | |
validates :name, :presence => true | |
validates :cnpj, :presence => true, :format => { :with => /^\d{2}.?(\d{3}.?){2}\/\d{4}-?\d{2}$/ } | |
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
#!/usr/bin/env ruby | |
git_bundles = [ | |
"git://github.com/astashov/vim-ruby-debugger.git", | |
"git://github.com/msanders/snipmate.vim.git", | |
"git://github.com/scrooloose/nerdtree.git", | |
"git://github.com/scrooloose/syntastic.git", | |
"git://github.com/timcharper/textile.vim.git", | |
"git://github.com/tpope/vim-cucumber.git", | |
"git://github.com/tpope/vim-fugitive.git", |
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' | |
require 'hmac-sha1' # on OS X: sudo gem install ruby-hmac | |
require 'net/https' | |
require 'base64' | |
# | |
# CHANGE ME: S3 access credentials go here, along with CloudFront Distribution ID | |
# | |
s3_access='' | |
s3_secret='' |
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/local/bin/ruby | |
# | |
# Keeps backups for odrible for the last 7 days | |
# | |
# Assumes backups are stored in the dir referenced by the | |
# constant BACKUP_DIR. | |
# | |
# Assumes backup file names are in the formats '20101217002634.mysql-backup-sftp-odrible2.sql.gz.enc' | |
require 'date' |
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
thumbnail: http://pds.exblog.jp/pds/1/201101/16/02/d0055302_13383029.jpg | |
video: http://www.youtube.com/watch?v=UE27t_LJpx0 |
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 'gosu' # gem install gosu --no-document | |
include Gosu | |
$dimension, $splits = 200, 20 | |
$size = $dimension.to_f / $splits.to_f | |
class Worm | |
attr_writer :dir | |
def initialize() reset 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
## Rvm | |
.ruby-gemset | |
lib/config/env/development.js | |
## MacVim | |
[._]*.s[a-w][a-z] | |
[._]s[a-w][a-z] | |
*.un~ | |
Session.vim | |
.netrwhist | |
*~ |
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
gem: --no-ri --no-rdoc |
OlderNewer