Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Tomas Salazar atomsfat

🏠
Working from home
View GitHub Profile
@daicham
daicham / gist:10253947
Last active May 31, 2019
SSH config for connecting to github and bitbucket over proxy
View gist:10253947
ProxyCommand "C:\Program Files\git\bin\connect.exe" -H proxy.example.com:8080 %h %p
Host github.com
HostName ssh.github.com
Port 443
IdentityFile C:\Users\hoge\.ssh\id_rsa
Host bitbucket.org
HostName altssh.bitbucket.org
Port 443
IdentityFile C:\Users\hoge\.ssh\id_rsa
@naholyr
naholyr / _service.md
Created Dec 13, 2012
Sample /etc/init.d script
View _service.md

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@domix
domix / delAllKeysInRedis.sh
Created Jan 15, 2012
Delete all keys in Redis
View delAllKeysInRedis.sh
redis-cli KEYS "*" | xargs redis-cli DEL
@elidupuis
elidupuis / handlebars-helpers.js
Last active Jul 7, 2020
Simple Handlebars.js helpers
View handlebars-helpers.js
/*! ******************************
Handlebars helpers
*******************************/
// debug helper
// usage: {{debug}} or {{debug someValue}}
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/)
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");
@topfunky
topfunky / new-github.sh
Created Jul 25, 2011
Shell shortcut to setup a Git repo with GitHub. Works with zsh or bash.
View new-github.sh
# Usage: new-github topfunky tidy_table
function new-github() {
git remote add origin git@github.com:$1/$2.git
git push origin master
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
git config push.default current
}
You can’t perform that action at this time.