Skip to content

Instantly share code, notes, and snippets.

View ceritium's full-sized avatar
🏠
Working from home

Jose Galisteo ceritium

🏠
Working from home
View GitHub Profile
@ceritium
ceritium / gitosis_config_generator.rb
Created June 4, 2009 16:25
Gitosis Config Generator
class GitosisConfigGenerator
def initialize
@config = {}
end
def add_group(name, options = {})
@config.store(name, {:writable => options[:writable], :readonly => options[:readonly], :members => options[:members]})
end
require 'rubygems'
require 'hpricot'
require 'open-uri'
class CareerjetSpider
BASE = "http://www.careerjet.com/search/jobs"
MONTH = { 'January' => 'Jan', 'February' => 'Feb', 'March' => 'Mar', 'April' => 'Apr', 'May' => 'May', 'June' => 'Jun', 'July' => 'Jul', 'August' => 'Aug', 'September' => 'Sep', 'October' => 'Oct', 'November' => 'Nov', 'December' => 'Dec'}
attr_reader :page
/* BIN2ISO (C) 2000 by DeXT
This is a very simple utility to convert a BIN image
(either RAW/2352 or Mode2/2336 format) to standard ISO format (2048 b/s).
Structure of images are as follows:
Mode 1 (2352): Sync (12), Address (3), Mode (1), Data (2048), ECC (288)
Mode 2 (2352): Sync (12), Address (3), Mode (1), Subheader (8), Data (2048), ECC (280)
Mode 2 (2336): Subheader (8), Data (2048), ECC (280)
Mode 2 / 2336 is the same as Mode 2 / 2352 but without header (sync+addr+mode)
#transacciones.hideme
Tienes
= @transacciones_count
= link_to_function "transacciones" do |page|
- page[:transacciones].show
before "deploy:migrate", 'db:backup'
namespace :db do
desc "Crea un backup de la base de datos antes de correr migraciones"
task :backup do
run "mkdir -p #{current_path}/db/backups"
run "mysqldump -u root -p #{application}_production | gzip > #{current_path}/db/backups/#{application}_production_#{Time.now.strftime '%Y%m%dT%:%H%M%S'}.gzip" do |ch, stream, out|
ch.send_data "the password" if out == "Enter password: "
end
no such file to load -- data-calendar
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:521:in `new_constants_in'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:156:in `require'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/rails/gem_dependency.rb:208:in `load'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:307:in `load_gems'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:307:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/initializer.rb:307:in `load_gems'
export PS1='\w$(__git_ps1 "(%s)") > '
#export PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] '
source ~/.rake_cap_bash_autocomplete.sh
#export PS1=">\[\033[s\]\[\033[1;\$((COLUMNS-4))f\]\$(date +%H:%M)\[\033[u\]"
alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
/Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/redgreen-1.2.2/lib/redgreen.rb:2:in `require': no such file to load -- test/unit/ui/console/testrunner (LoadError)
from /Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/redgreen-1.2.2/lib/redgreen.rb:2:in `<top (required)>'
from /Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `require'
from /Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/runtime.rb:64:in `block (2 levels) in require'
from /Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `each'
from /Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/runtime.rb:62:in `block in require'
from /Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `each'
from /Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler/runtime.rb:51:in `require'
from /Users/ceritium/.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.0/lib/bundler.rb:112:in `require'
from /Users/c
test "lo que sea" do
assert true
end
class Project
include Mongoid::Document
include Mongoid::Timestamps
embeds_many :histories
has_many :invitations
field :name, type: String
validates_presence_of :name