Skip to content

Instantly share code, notes, and snippets.

View rrodrigu3z's full-sized avatar

Ricardo David Rodríguez rrodrigu3z

  • Sunlight
  • Santiago, Chile
View GitHub Profile
Installing Phusion Passenger Standalone...
[******************************** ] Preparing Nginx... -
checking for OS
+ Linux 2.4.21-20.EL i686
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... not found
checking for C99 variadic macros ... found
Installing Phusion Passenger Standalone...
[******************************** ] Preparing Nginx... \
checking for OS
+ Linux 2.4.21-20.EL i686
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... not found
checking for C99 variadic macros ... found
Installing Phusion Passenger Standalone...
[******************************** ] Preparing Nginx... \
checking for OS
+ Linux 2.4.21-20.EL i686
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 3.2.3 20030502 (Red Hat Linux 3.2.3-42)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... not found
checking for C99 variadic macros ... found
@rrodrigu3z
rrodrigu3z / iptables_redirect_http.sh
Created February 23, 2011 20:04
Hack para enrutar los requests tcp a un Squid Proxy que esta en otro host
#!/bin/bash
iptables -t nat --flush
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
echo 1 > /proc/sys/net/ipv4/ip_forward
@rrodrigu3z
rrodrigu3z / gist:788033
Created January 20, 2011 15:09
duda - cascade
# En el environment.rb
# Asumo esto basado en que mencionas que no usas pluralización
ActiveRecord::Base.pluralize_table_names = false
# migration para personas
class CreatePersonas < ActiveRecord::Migration
def self.up
create_table :personas, :force => true do |t|
t.string :nombre
t.integer :hogar_id # Plural o singular?
module ActiveRecord
module ConnectionAdapters
class FiberedMonitor
class Queue
def wait(timeout)
t = timeout || 5
fiber = Fiber.current
x = EM::Timer.new(t) do
@queue.delete(fiber)
fiber.resume(false)
# coding:utf-8
$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
require 'rubygems'
require 'active_record'
require 'em-mysqlplus'
require 'em-synchrony'
require 'em-activerecord'
db_config = YAML.load_file(File.join(File.dirname(__FILE__), 'config', 'database.yml'))