This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('hi'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clean up merged local branches | |
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var $private = $injector.has("$private") ? $injector.get("$private") : {}; | |
$private.myprivatfn = function (){}; | |
this.mypublicfn = function () { | |
$private.myprivatefn(); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_dir { | |
for i in `find $1 -type f|grep _test.rb`; do echo "$(tput bold)> $i$(tput sgr0)" && bundle exec ruby -Itest $i; done | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function methodThatCleansUpStuff(){ | |
// dont return anything cause you are just cleaning up | |
} | |
function doAsyncStuff() { | |
return methodThatGivesAPromise() | |
.then(otherMethodThatGivesAPromise) | |
.then(()=>{throw new Error(“BOOM”)}) | |
.then(otherOtherMethodThatGivesAPromise) | |
.catch(methodThatCleansUpStuff) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.xhrPool = []; | |
$.xhrPool.abortAll = function() { | |
$.xhrPool.forEach(function(jqXHR) { | |
jqXHR.abort(); | |
}); | |
}; | |
$.rails.ajax = function(options){ | |
var req = $.ajax(options); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.state('G', { | |
redirectTo: function (trans) { | |
var svc = trans.injector().get('SomeAsyncService'); | |
var promise = svc.getAsyncRedirectTo(trans.params.foo); | |
return promise; | |
} | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".panel.visible .story").has(".selector.selected").find(".meta span").toArray().reduce(function(e,r){return e+parseInt(r.innerHTML)},0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Static App Development | |
## Get the repos | |
* clone https://github.com/PotomacInnovation/compass-ae | |
* clone https://github.com/PotomacInnovation/compass-frontend | |
## Start the server | |
in compass-ae | |
* yarn | |
* yarn start-debug |