Skip to content

Instantly share code, notes, and snippets.

@noxqsgit
noxqsgit / socat.sh
Created April 18, 2013 15:30
socat -- still testing
socat -d -d -d TCP4-LISTEN:9999,fork,bind=localhost TCP4:192.168.1.222:27017
@noxqsgit
noxqsgit / log.coffee
Created April 19, 2013 10:36
console.log
L = -> console.log.apply console, arguments
@noxqsgit
noxqsgit / rsync.sh
Created April 23, 2013 14:29
rsync local & remote commands
rsync -a server:backups/ backups/foo/
rsync --server --sender -logDtpre.iLsf . backups/
@noxqsgit
noxqsgit / cfg-ex.rb
Last active December 18, 2015 11:09
actionmailer + smtp + CFG
CFG = {
test: {},
prod: {},
dev: {
...
# smtp: { ... }
}
}
@noxqsgit
noxqsgit / README.md
Last active December 27, 2015 18:39
nap switch branch

nap (remote)

nap stop APP

apps/APP (local)

git checkout stable
git push REMOTE stable
git branch -d master
@noxqsgit
noxqsgit / cms_dump.rake
Last active December 28, 2015 03:09
DOES NOT WORK, USE https://github.com/obfusk/active-dump // seed_dump + comfortable-mexican-sofa
# seed_dump + comfortable-mexican-sofa
# $ cp .../cms_dump.rake lib/tasks/
# $ rake db:seed:dump:cms
models = %w{
Cms::Block Cms::Layout Cms::Page Cms::Revision Cms::Site
}
namespace :db do
namespace :seed do
@noxqsgit
noxqsgit / README.md
Last active December 28, 2015 07:49
different Gemfile.lock files for different branches

Use different Gemfile.lock files for different branches:

  • Symlink Gemfile.branch1 and Gemfile.branch2 to Gemfile.all.
  • Use the branch-bundle script instead of bundle.
@noxqsgit
noxqsgit / .bash_profile
Created November 15, 2013 13:41
~nap dotfiles
# NAP {
umask 0022
export PATH="/__nap/nap/bin:$PATH" NAPRC=/__nap/cfg/naprc
# } NAP
# FELIX {
for _path in \
@noxqsgit
noxqsgit / _ssl.conf
Last active January 3, 2016 03:19
nginx ssl proxy for all vhosts
ssl_certificate /etc/felix/ssl/foo.bundle.crt;
ssl_certificate_key /etc/felix/ssl/foo.key;
ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 5m;
add_header Strict-Transport-Security 'max-age=31536000';
@noxqsgit
noxqsgit / bcrypt.sh
Created April 1, 2014 11:20
create bcrypt hash w/ ruby oneliner
ruby -rbcrypt -e 'print "password> "; puts BCrypt::Password.create(readline.chomp)'