Skip to content

Instantly share code, notes, and snippets.

View guillermo's full-sized avatar
😍
Processing request ...

Guillermo Álvarez guillermo

😍
Processing request ...
View GitHub Profile
@guillermo
guillermo / gist:20448
Created October 28, 2008 17:52 — forked from mort/gist:20341
78 char column with
Oferta de trabajo en Simplelógica http://simplelogica.net keywords: rails,
ruby, web, simplelogica, hacking Contacto: david@simplelogica.net Fecha:
28/10/2008
Hola,
en Simplelógica estamos buscando un/una desarrollador/desarrolladora en Rails
para trabajar con nosotros. No necesitamos superexpertos, sino gente que esté
entusiasmada por su experiencia con Rails hasta el momento y quiera continuar
aprendiendo y mejorando en un entorno bastante agradable, con proyectos
@guillermo
guillermo / klubbers fm radio podcast
Created December 20, 2008 14:17
klubbersfm.comunidadspaceofsound.net/
#!/usr/local/bin/ruby
# This is the software to extract klubbers fm radio podcast.
#
# You can access the klubbers fm podcast in:
# http://klubbersfm.comunidadspaceofsound.net/
#
require 'rubygems'
require 'sinatra'
require 'hpricot'
@guillermo
guillermo / gist:55561
Created January 31, 2009 14:36
RBeautify
#!/usr/bin/ruby -w
=begin
/***************************************************************************
* Copyright (C) 2008, Paul Lutus *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
@guillermo
guillermo / build_ruby19.sh
Created February 18, 2009 19:21 — forked from postmodern/build_ruby19.sh
build_ruby19.sh With Curl insted wget
#!/bin/sh
mkdir -p /usr/local/src && cd /usr/local/src
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2
tar -xjvf ruby-1.9.1-p0.tar.bz2
cd ruby-1.9.1-p0
./configure --prefix=/usr --program-suffix=19 --enable-shared
make && make install
Testing gist
@guillermo
guillermo / twitter_backup.rb
Created October 31, 2009 17:27
Twitter Backup
require 'twitter'
# TwitterBackup.new(user,pass).backup!
# Will save tweets to files
# ~/.twitter_backup/tweets/tweet_id.yaml # Full yaml tweet
# ~/.twitter_backup/tweets/tweet_id.txt # Only tweet text
# Search locally in your tweets
# cat ~/.twitter_backup/tweets/*.txt | grep -i 'some text'
@guillermo
guillermo / rack_environment.rb
Created November 27, 2009 12:45
Rack::Environment is a simple way to easily differentiate the different working environments
class RackEnvironment
def initialize(app)
@app = app
@environments = {}
@changes = lambda {}
yield self
end
def call(env)
@guillermo
guillermo / test.rb
Created March 4, 2010 17:06
Inno vs Isam
#!/usr/bin/env ruby
require File.dirname(__FILE__)+'/../config/environment'
ActiveRecord::Migration.create_table(:isam_items, :options => 'ENGINE=MyIsam DEFAULT CHARSET=utf8') do |t|
t.string :item_type
end
ActiveRecord::Migration.create_table(:inno_items, :options => 'ENGINE=InnoDB DEFAULT CHARSET=utf8') do |t|
t.string :item_type
end
@guillermo
guillermo / search.rb
Created September 22, 2010 17:50
Mini search logic
class Search < OpenStruct
def to_hash
@table
end
end
@guillermo
guillermo / learn_ruby_by_example.rb
Created September 27, 2010 17:20 — forked from raul/learn_ruby_by_example.rb
learn ruby with multi process
#!/usr/bin/env ruby
#
# This fork add support for running code in a forked process
#
# encoding: UTF-8
#
# LearnRubyByExample:
#
# Ruby is a highly expressive programming language.
# Testing software is an expressive way to communicate how it works.