Skip to content

Instantly share code, notes, and snippets.

View trashhalo's full-sized avatar
:shipit:

Stephen Solka trashhalo

:shipit:
View GitHub Profile
@trashhalo
trashhalo / cancelAJAX.js
Last active March 7, 2016 03:21 — forked from Integralist/cancelAJAX.js
Try to cancel all jQuery AJAX requests currently running
$.xhrPool = [];
$.xhrPool.abortAll = function() {
$.xhrPool.forEach(function(jqXHR) {
jqXHR.abort();
});
};
$.rails.ajax = function(options){
var req = $.ajax(options);
@trashhalo
trashhalo / 0_reuse_code.js
Last active August 29, 2015 14:22
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
@trashhalo
trashhalo / git-clean-local.sh
Last active August 29, 2015 13:56 — 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