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
function myPromise() { | |
let deferred = Q.defer() | |
myRequest(options, function (err, body)) { | |
if (err) { | |
deferred.reject(err) | |
} | |
deferred.resolve(body) |
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
python -m SimpleHTTPServer 8888 |
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
mcn_name='prod' | |
apt_url='https://apt.dockerproject.org' | |
lsb_dist='ubuntu' | |
dist_version='trusty' | |
arch=$(docker-machine ssh ${mcn_name} dpkg --print-architecture) | |
repo='main' | |
docker-machine ssh ${mcn_name} "echo deb [arch=${arch}] ${apt_url}/repo ${lsb_dist}-${dist_version} ${repo} | sudo tee /etc/apt/sources.list.d/docker.list" | |
docker-machine ssh ${mcn_name} sudo apt-get update | |
docker-machine ssh ${mcn_name} sudo apt-get install -y docker-engine |
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
/* | |
- Implicit Binding | |
- Explicit Binding | |
- new Binding | |
- window Binding | |
*/ | |
// Implicit Binding | |
// Left of the Dot at Call Time | |
var Person = function (name, age) { |
OlderNewer