docker | docker-machine | docker-compose | docker swarm cheatsheet
Used to create VMs that run docker
docker-machine create -d virtualbox machinename
{ | |
"env": { | |
"node": true, | |
"es6": true | |
}, | |
"extends": "standard", | |
"parser": "babel-eslint", | |
"parserOptions": { | |
"ecmaFeatures": { | |
"experimentalObjectRestSpread": true, |
<meta charset="UTF-8"> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> | |
<meta content="utf-8" http-equiv="encoding"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content="Большинство поисковых серверов отображают содержимое поля description при выводе результатов поиска. Если этого тега нет на странице, то поисковый движок просто перечислит первые встречающиеся слова на странице, которые, как правило, оказываются не очень-то и в тему." /> | |
<meta name="Keywords" content="HTML, META, метатег, тег, поисковая система" /> | |
<meta name="author" content="Pat Scott"> |
Verifying that "patscott.id" is my Blockstack ID. https://onename.com/patscott |
import pRequest from 'util/promiseRequest' | |
Object.resolve = function(path, obj) { | |
return path.split('.').reduce(function(prev, curr) { | |
return prev ? prev[curr] : undefined | |
}, obj) | |
} | |
export class RESTConnector { | |
constructor({ rootUrl, keyPath }) { |
# create a branch (ex. 'bug/checkout-error ' | |
# or 'feature/segment-analytics') | |
| |
git checkout -b feature/example | |
| |
# Do work, then commit your changes. | |
# To create a commit you first need to add the files | |
# you are going to commit. This is known | |
# as "staging the files". | |
# Check that the files changes are what you think. |
Modal = function() { | |
if (! (this instanceof Modal)) { | |
return new Modal(options); | |
} | |
this.modalTemp = null; | |
this.clearTimeout = null; | |
this.inserted = false; | |
this.fixScrollPosition = true; | |
this._lastScrollTop = 0; |
<!-- Context should be the object you are tagging --> | |
<template name="tagInput"> | |
<select class='tag-input' name='tags[]' multiple="multiple"> | |
{{#each tags}} | |
<option value="{{this}}" selected="true">{{this}}</option> | |
{{/each}} | |
</select> | |
</template> |
<template name='configureYelp'> | |
<div class="container"> | |
<div class="section"> | |
<h1>Yelp API Access Configuration</h1> | |
<p class="lead">Do not change if you don't know what you are doing.</p> | |
<p>{{currentConfig}}</p> | |
{{> quickForm schema=configureYelp doc=this id='configureYelp' type='method' meteormethod='configureYelp' buttonClasses="btn btn-primary" buttonContent="Configure Yelp"}} | |
</div> | |
</div> | |
</template> |
// A Promise is an object that represents a task with two possible outcomes (success or failure) and holds callbacks that fire | |
// when one outcome or the other has occurred. | |
// But the biggest advantage of using Promises is that you can easily derive new Promises from existing ones. | |
// You might ask two Promises representing parallel tasks to give you a Promise that will inform you of their mutual completion. | |
// Or you might ask a Promise representing the first task in a series to give you a Promise representing the final task in | |
// the series. | |
// Without Promises | |
$.get('/mydata', { |