Skip to content

Instantly share code, notes, and snippets.

@gerardorf
gerardorf / forin.sublime-snippet
Created June 9, 2014 15:11
sublime snippet to generate a for-in loop
<snippet>
<content><![CDATA[
for (${1:obj} in ${2:array}){
${3:}
};
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>forin</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.js</scope>
@gerardorf
gerardorf / 0_reuse_code.js
Created July 17, 2014 16:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gerardorf
gerardorf / config
Last active December 19, 2017 17:11
bastion ssh configuration. Add this config on ~/.ssh/config
Host *.gerardorf.org !bastion.gerardorf.org
User admin
IdentityFile ~/.ssh/gerardorf-private-key
ProxyCommand ssh -W %h:%p [email protected]
Host bastion.gerardorf.org
Hostname XXX.XXX.XXX.XXX
User admin
IdentityFile ~/.ssh/gerardorf-private-key
ForwardAgent yes
@gerardorf
gerardorf / fswatch-sample.sh
Last active December 18, 2017 10:58
Run a command on file change. Monitor directory
// https://github.com/emcrisostomo/fswatch/wiki/How-to-Use-fswatch
fswatch -or . | xargs -n1 -I{} echo hola
Homebrew Permissions Denied Issues Solution
===========================================
### `sudo chown -R $(whoami) $(brew --prefix)/*`