Skip to content

Instantly share code, notes, and snippets.

View railsfactory's full-sized avatar

RailsFactory railsfactory

View GitHub Profile
for OS X
brew install postgresql
env ARCHFLAGS="-arch x86_64" gem install postgres
createdb -T template0 -E UTF8 activerecord_unittest
createdb -T template0 -E UTF8 activerecord_unittest2
for ubuntu
#sudo apt-get update
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log info;
pid logs/nginx.pid;
2009/09/18 02:16:33 [notice] 16865#0: using the "kqueue" event method
2009/09/18 02:16:33 [notice] 16865#0: nginx/0.7.61
2009/09/18 02:16:33 [notice] 16865#0: built by gcc 4.0.1 (Apple Inc. build 5493)
2009/09/18 02:16:33 [notice] 16865#0: OS: Darwin 9.8.0
2009/09/18 02:16:33 [notice] 16865#0: hw.ncpu: 2
2009/09/18 02:16:33 [notice] 16865#0: net.inet.tcp.sendspace: 65536
2009/09/18 02:16:33 [notice] 16865#0: kern.ipc.somaxconn: 128
2009/09/18 02:16:33 [notice] 16865#0: getrlimit(RLIMIT_NOFILE): 256:9223372036854775807
2009/09/18 02:16:33 [notice] 16877#0: start worker processes
2009/09/18 02:16:33 [notice] 16877#0: start worker process 16878
module Handler
def file_modified
puts "#{path} modified"
lines = File.read(path)
lines.each do|line|
#puts "I read this line: #{line.chomp}"
url = line.chomp
http = EventMachine::HttpRequest.new(url).get #.get( :timeout => 10)
Senthil:demo senthil$ gdb ruby
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .... done
(gdb) run async_file_monitoring_client.rb
Senthil:demo senthil$ gdb ruby
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:43:13 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for shared libraries .... done
(gdb) run async_file_monitoring_client.rb
require 'rubygems'
require 'eventmachine'
require 'em-http'
require 'pp'
require 'digest/md5'
urls = ['http://www.yahoo.com/','http://www.railsfactory.com/','http://www.railsbuddies.com/','http://www.techcrunch.com/','http://www.wired.com/'] #['http://www.google.com/'] #,
EventMachine.run {
Portfolio
Here is our current inventory of available domains. We also offer leasing options for some domains. We also consider reasonable offers so dont hesitate to sending us an email. info@amgdomains.com
.COM, .NET, .ORG EXTENSION DOMAINS
ABOUTVEGAS.ORG $195
ABUDHABICONTRACTORS.COM $995
ABUDHABIEXCLUSIVECONDOS.COM $1995
ABUDHABIEXCLUSIVEHOMES.COM $1995
def hello_world
puts "hello world"
end