Skip to content

Instantly share code, notes, and snippets.

View vitormil's full-sized avatar

Vitor Oliveira vitormil

View GitHub Profile
@vitormil
vitormil / nginx.conf
Last active December 30, 2015 15:59
/etc/nginx/nginx.conf
user www-data www-data;
worker_processes 1; # 1 per core
pid /var/run/nginx.pid;
events {
worker_connections 1024;
use epoll;
}
http {
description "NGINX http daemon"
start on runlevel [2345]
stop on runlevel [016]
env DAEMON=/usr/sbin/nginx
env PID=/var/run/nginx.pid
pre-start script
mkdir -p /var/log/nginx
@vitormil
vitormil / .gemrc
Last active December 21, 2015 07:28
vagrant vm config
cat << EOF > ~/.gemrc
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
EOF
@vitormil
vitormil / gist:4364864
Last active May 27, 2022 18:20
partially disable the zsh's autocorrect feature

the problem:

subl somefile
zsh: correct 'subl' to 'ul' [nyae]? n

node -v
zsh: correct 'node' to 'od' [nyae]? n
v0.8.16
@vitormil
vitormil / gist:4364716
Last active December 10, 2015 02:08
SublimeText 2 - Command-Line Setup on OS X

To open files and folders from your command-line you need to add Sublime Text 2 to your path.

sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl

And then...

subl ~/mysitedir
@vitormil
vitormil / gist:3426910
Last active October 9, 2015 02:48 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@vitormil
vitormil / router.js
Created April 13, 2012 03:07 — forked from codeschool-courses/router.js
Challenge 7-4
var AppRouter = Backbone.Router.extend({
routes: {
"appointments/:id": "show"
},
show: function(id){
console.log("heyo we're in show with id %d", id);
}
});