(aka "errback" or "error first callback")
- Function that takes 2 arguments
- first argument is an error
- second argument is the result
- Never pass both
- error should be instanceof Error
- Must never excecute on the same tick of the event loop
- Must be passed as last argument to function
En åpen kildekode-kontrakt for web-designere og -utviklere av [Fjellstad & Skogly] (http://www.fjellstadskogly.no/) basert på ["Contract Killer"] (http://stuffandnonsense.co.uk/projects/contract-killer/) av [Stuff & Nonsense] (http://stuffandnonsense.co.uk/) og [eksempler på oppdragsavtaler] (http://www.frilansinfo.no/nedlasting) av [Frilansinfo] (http://www.frilansinfo.no/).
- Originalt utgitt: 12.02.2014
- Revidert dato: 16.06.2015
This file contains 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
angular.module('stateMock',[]); | |
angular.module('stateMock').service("$state", function($q){ | |
this.expectedTransitions = []; | |
this.transitionTo = function(stateName){ | |
if(this.expectedTransitions.length > 0){ | |
var expectedState = this.expectedTransitions.shift(); | |
if(expectedState !== stateName){ | |
throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName ); | |
} | |
}else{ |
This file contains 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
#!/usr/bin/env bash | |
curl https://s3.amazonaws.com/heroku-jvm-buildpack-vi/vim-7.3.tar.gz --output vim.tar.gz | |
mkdir vim && tar xzvf vim.tar.gz -C vim | |
export PATH=$PATH:/app/vim/bin |
This file contains 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
//Install Macports. | |
//Install aircrack-ng: | |
sudo port install aircrack-ng | |
//Install the latest Xcode, with the Command Line Tools. | |
//Create the following symlink: | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport | |
//Figure out which channel you need to sniff: | |
sudo airport -s | |
sudo airport en1 sniff [CHANNEL] |
I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):
For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.
- get both the git and github plugin
- http://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin