# Install ESLint and Babel ESLint
# Make sure to install at least v5.1.0 of ESLint
npm install --save-dev eslint babel-eslint
# Install the Airbnb configs (3 of them, listed below)
npx install-peerdeps --dev eslint-config-airbnb
# Install Prettier + ESLint config
npm install --save-dev --save-exact prettier eslint-config-prettier
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
"github.com/darkhelmet/env" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<h1>Main Page</h1> | |
<iframe class="wide-iframe" src="index2.html"></iframe> | |
<iframe class="narrow-iframe" src="index2.html"></iframe> |
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
var colorHelper = { | |
// only accepts hex values for now | |
transitionSteps: function(colors, numberOfSteps) { | |
var _this = this; | |
var fromColor = _this.hexToRGB(colors.from); | |
var toColor = _this.hexToRGB(colors.to); | |
var diff = rgbDiff(fromColor, toColor); | |
var steps = breakIntoSteps(diff, numberOfSteps); | |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httputil" | |
"net/url" | |
"github.com/darkhelmet/env" |
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
Show hidden characters
{ | |
"presets": ["env"], | |
"plugins": ["external-helpers"] | |
} |
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
user www www; ## Default: nobody | |
worker_processes 5; ## Default: 1 | |
error_log logs/error.log; | |
pid logs/nginx.pid; | |
worker_rlimit_nofile 8192; | |
events { | |
worker_connections 4096; ## Default: 1024 | |
} |
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
--- | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: A basic CloudFormation template for an RDS Aurora cluster. | |
Parameters: | |
DatabaseInstanceType: | |
Default: db.r3.large | |
AllowedValues: | |
- db.r3.large | |
- db.r3.xlarge | |
- db.r3.2xlarge |
Starting with 1.12, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.
- TCP port 2377 for cluster management communications
- TCP and UDP port 7946 for communication among nodes
- TCP and UDP port 4789 for overlay network traffic
AWS Tip: You should use Security Groups in AWS's "source" field rather then subnets, so SG's will all dynamically update when new nodes are added.
This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.
You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.
$ docker --version
Docker version 1.12.0, build 8eab29e
You also need Docker machine installed.
NewerOlder