Skip to content

Instantly share code, notes, and snippets.

@ak47
ak47 / unicorn.rb
Created April 3, 2014 23:54
force figaro ENV vars to reload on unicorn USR2 restarts
root = "/var/www/cake/current"
working_directory root
pid "#{root}/tmp/pids/unicorn.pid"
stderr_path "#{root}/log/unicorn.stderr.log"
stdout_path "#{root}/log/unicorn.log"
listen "/tmp/unicorn.cake.sock"
worker_processes 2
timeout 15
@ak47
ak47 / gist:b440e04d4e8beedc9ac4
Last active August 29, 2015 14:08
docker mongo shared replica set for dev
# https://sebastianvoss.com/docker-mongodb-sharded-cluster.html
# rs1_srv1 172.17.0.20:49170
# rs1_srv2 172.17.0.21:49171
# rs1_srv3 172.17.0.22:49172
# rs2_srv1 172.17.0.23:49173
# rs2_srv2 172.17.0.24:49174
# rs2_srv3 172.17.0.25:49175
# cfg1 172.17.0.26:49176
# mongos1 172.17.0.27:49177
irb(main):002:0> a.password = 'Qa123456'
=> "Qa123456"
irb(main):003:0> a.password_confirmation = 'Qa123456'
=> "Qa123456"
irb(main):004:0> a.save
@ak47
ak47 / .vimrc
Last active October 7, 2020 21:20
syntax on
colo murphy
set nu
set tabstop=8 softtabstop=0 expandtab shiftwidth=2 smarttab
set ignorecase
set backspace=indent,eol,start
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8