Skip to content

Instantly share code, notes, and snippets.

@salarkhan
salarkhan / yasin.js
Last active November 14, 2021 05:56
function Thing(v){
this.value = v
this.children = []
this.addChild = function(v){
this.children.push(new Thing(v))
}
this.butt = function(v){
console.log(this.value)
@salarkhan
salarkhan / app.js
Last active August 29, 2015 14:05
AJAX & OOJS
window.addEventListener( 'load', init )
function init(){
var controller = new Controller( new Model, new View )
}
function Controller( model, view ){
this.model = model
this.view = view
}
@salarkhan
salarkhan / git.sh
Last active August 29, 2015 13:58
weird
# track && fetch && pull all remote branches
for remote in \`git branch -r\`; do git branch --track $remote; done
git fetch --all
git pull --all
# git filter to change email addresses globally
# can also replace with GIT_AUTHOR_EMAIL -- use `git log` to check
git filter-branch --commit-filter '
if [ "$GIT_AUTHOR_NAME" = "Salar Khan" ];
then