Skip to content

Instantly share code, notes, and snippets.

View m3nd3s's full-sized avatar

Almir Mendes m3nd3s

View GitHub Profile
@m3nd3s
m3nd3s / nginx.conf
Created October 10, 2014 14:10
Nginx: Navegação Liberada por IP
#
# Diretiva http {}
#
http {
# ...
geo $developer {
default no;
#177.206.31.159/32 yes; # IP que terá liberação
@m3nd3s
m3nd3s / helper.rb
Created November 13, 2013 13:33
Helper do Mendes
#encoding: utf-8
module M3nd3s
def me_ajuda!
"NÃO"
end
end
@m3nd3s
m3nd3s / gitconfig
Created November 1, 2013 16:15
Git config
[user]
name = NOME
email = EMAIL
[color]
branch = auto
diff = auto
status = auto
ui = true
[color "branch"]
current = yellow reverse
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@m3nd3s
m3nd3s / unicorn.conf
Created August 12, 2013 12:32
Upstart Script for Unicorn
description "Unicorn configuration"
start on filesystem
stop on shutdown
respawn
@m3nd3s
m3nd3s / irc.mkd
Last active December 17, 2015 01:09
Alguns comandos IRC

Register

Make sure you're using the nickname you would like to register.

/msg nickserv register YOURPASSWORD YOUREMAIL
# (Example: /msg nickserv register chattingiscool julie@montreal.com)

Connecting:

/msg NickServ IDENTIFY password

@m3nd3s
m3nd3s / hackin.rb
Created November 27, 2012 20:46
Hackin example
# Parâmetros armazenados em um array
a = [1, 2]
# Método a ser chamado
class Hackin
def self.teste(p1, p2)
puts "Param1: #{p1}"
puts "Param2: #{p2}"
end
end
@m3nd3s
m3nd3s / NERDTree.mkd
Last active November 23, 2023 13:45
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|