Skip to content

Instantly share code, notes, and snippets.


Stephen Solka trashhalo

View GitHub Profile
trashhalo / cancelAJAX.js
Last active Mar 7, 2016 — forked from Integralist/cancelAJAX.js
Try to cancel all jQuery AJAX requests currently running
View cancelAJAX.js
$.xhrPool = [];
$.xhrPool.abortAll = function() {
$.xhrPool.forEach(function(jqXHR) {
$.rails.ajax = function(options){
var req = $.ajax(options);
trashhalo / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
trashhalo /
Last active Aug 29, 2015 — forked from schacon/gist:942899
Cleans up local tracking branches that dont exist on the remote. Removes all remote branches that have been merged into master.
# clean up merged local branches
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d