autocmd BufWritePre * :%s/\s\+$//e
(add-hook 'before-save-hook 'delete-trailing-whitespace)
$strace zmq_server 5672 | |
execve("/usr/local/bin/zmq_server", ["zmq_server", "5672"], [/* 36 vars */]) = 0 | |
brk(0) = 0x8672000 | |
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) | |
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb800b000 | |
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory) | |
open("/etc/ld.so.cache", O_RDONLY) = 3 | |
fstat64(3, {st_mode=S_IFREG|0644, st_size=61344, ...}) = 0 | |
mmap2(NULL, 61344, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7ffc000 | |
close(3) = 0 |
require 'spec/spec_helper' | |
describe "ThinkingSphinx::ActiveRecord (testing total entries results) " do | |
before :all do | |
@sphinx.setup_sphinx | |
@sphinx.start | |
end | |
after :all do |
(in /home/mmmurf/projects/penguin_shipping_lab) | |
/usr/bin/ruby1.8 -Ilib:lib "/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/gateways/penguin_discounted/pdf_test.rb" "test/gateways/penguin_discounted/images_test.rb" "test/gateways/endicia/pdf_test.rb" "test/gateways/endicia/images_test.rb" "test/gateways/ups/pdf_test.rb" "test/gateways/ups/images_test.rb" "test/gateways/usps/images_test.rb" | |
/usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:445:in `load_missing_constant': uninitialized constant Dependencies (NameError) | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:77:in `const_missing' | |
from /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:89:in `const_missing' | |
from ./lib/penguin_shipping_lab.rb:23 | |
from ./init.rb:5:in `require' | |
from ./init.rb:5 | |
from ./test/gateways/penguin_discounted/../../test_helper.rb:1:in `require' | |
from ./test/gateways/penguin_discounted/../ |
config.after_initialize do | |
#CACHE | |
MEMCACHE_SERVER = case RAILS_ENV | |
when 'development' then 'localhost:11211' | |
when 'staging' then '127.0.0.1:11211' | |
when 'production' then '192.168.2.26:11211' | |
when 'test' then nil | |
else raise | |
end |
/projects/5304ecaf565147c7e488$ unicorn | |
I, [2010-03-28T16:40:14.986279 #27939] INFO -- : listening on addr=0.0.0.0:8080 fd=3 | |
I, [2010-03-28T16:40:15.095040 #27939] INFO -- : worker=0 spawning... | |
I, [2010-03-28T16:40:15.096947 #27939] INFO -- : master process ready | |
I, [2010-03-28T16:40:15.098584 #27941] INFO -- : worker=0 spawned pid=27941 | |
I, [2010-03-28T16:40:15.807127 #27941] INFO -- : worker=0 ready | |
No view class found for layout in . | |
NoMethodError - undefined method `empty?' for nil:NilClass: | |
/usr/local/ruby1.9/lib/ruby/gems/1.9.1/gems/mustache-0.9.1/lib/mustache/sinatra.rb:67:in `mustache' | |
/home/mmmurf/projects/5304ecaf565147c7e488/app.rb:13:in `block in <class:App>' |
require 'dm-core' | |
require 'dm-migrations' | |
class Foo | |
include DataMapper::Resource | |
property :id, Serial | |
has n, :bars | |
end | |
class Bar |
class DomainSession < Rack::Session::Cookie | |
def set_cookie(env, headers, cookie) | |
cookie[:domain] ||= Rack::Request.new(env).host[/(\.[^\.]+){2}$/] | |
super | |
end | |
end | |
use DomainSession |
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
rails_env = ENV['RAILS_ENV'] || 'production' | |
# 16 workers and 1 master | |
worker_processes (rails_env == 'production' ? 16 : 4) | |
# Load rails+github.git into the master before forking workers | |
# for super-fast worker spawn times | |
preload_app true |
# Run: curl https://gist.github.com/raw/719970/locale_diff.rb | ruby - en fi | |
require 'rubygems' | |
require 'yaml' | |
l1 = ARGV[0] | |
l2 = ARGV[1] | |
first = YAML.load_file(l1 + ".yml") | |
second = YAML.load_file(l2 + ".yml") | |
def diff(root, compared, structure = []) |