Skip to content

Instantly share code, notes, and snippets.

View naxhh's full-sized avatar
💻
Devoping

Ignacio Tolstoy naxhh

💻
Devoping
  • Barcelona
View GitHub Profile
@naxhh
naxhh / Sublime text2 file ignore
Created October 17, 2012 20:45
Avoid files&folders to project
{
"folders":
[
{
"path": "/C/xampp/htdocs/l4c.me",
"folder_exclude_patterns": ["node_modules", "logs", "-p", "tmp"],
"file_exclude_patterns": ["*.gitignore", "*.sample", "*.md"]
}
]
}
@naxhh
naxhh / gist:3907966
Created October 17, 2012 20:32
Hands on git console

In order to force myself to use git commands and not GUI I put here commands I may need.

Common use commands

Create/Switch branches

git checkout <branch>
git checkout -b <branchname> origin/<branch>
@naxhh
naxhh / Throttle with public key
Created September 13, 2012 19:51
Throttle APP ID based on APP public token
/**
* This is based on the idea you have an authorization class done with:
* auth.getToken to generate a token based on a ID and a password
* auth.checkToken to validate this token (returning the ID of the app to use in req.username)
*
* NOTES:
* I use a redis loader to set redis instance in res.locals
*
* I set burst and rate to 1 to easy check the override and the system working
*/