Skip to content

Instantly share code, notes, and snippets.

@drorweiss
drorweiss / 0_reuse_code.js
Created May 15, 2014 20:51
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
This is an awesome gist!!
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
@drorweiss
drorweiss / heroku
Last active August 29, 2015 14:02
Deployment from sub-dir to heroku
Normal push to heroku (From https://coderwall.com/p/ssxp5q):
git subtree push --prefix pythonapp heroku master
Initial push to heroku remote From http://stackoverflow.com/questions/13756055/git-subtree-subtree-up-to-date-but-cant-push
git push heroku `git subtree split --prefix pythonapp master`:master --force
Compact history after initial deploy From http://stackoverflow.com/questions/16134975/reduce-increasing-time-to-push-a-subtree
git subtree split --rejoin --prefix=<prefix> <commit...>
@drorweiss
drorweiss / f1.java
Last active August 29, 2015 14:04
from [codota](http://www.codota.com)
blah