Skip to content

Instantly share code, notes, and snippets.

View StevenACoffman's full-sized avatar

Steve Coffman StevenACoffman

View GitHub Profile
@StevenACoffman
StevenACoffman / Deploy Docker to AWS.md
Last active November 5, 2017 17:11 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk

Placeholder

@StevenACoffman
StevenACoffman / AJAX.md
Last active January 30, 2018 14:05
Ajax (and RxJS)

Also might be worth checking out my other gist comparing react/redux async libraries.

This was interesting read on axios vs fetch api with regard to api error handling, XRSF, etc. In addition the specification doesn't have a way of dealing with timeouts or cancellation, so you need to do a fair amount of promise racing to do that. It's the standard, and they are working on it. See here and here.

rxjs ajax uses XmlHttpRequest

This comparison of Ajax libraries is interesting, so I added cancellation and timeout columns to it down below.

@StevenACoffman
StevenACoffman / Swarm.md
Created April 2, 2017 14:22 — forked from errordeveloper/Swarm.md
A quick guide to using Weave Net with Docker Swarm

Weave Net and Docker Swarm

This example show how-to setup a very simple Swarm cluster enabled with Weave Net.

## Infratructure

There are two hosts that have a recent version of Docker Engine running.

These hosts are named host1 and host2, and might have the following in /etc/hosts or you just substitute IP addresses in the commands shown below.

- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.
@StevenACoffman
StevenACoffman / Bootstrap-vs-Foundation.md
Last active April 13, 2017 17:28
Twitter Bootstrap vs Zurb Foundation
@StevenACoffman
StevenACoffman / Reproduce Fluent flowcounter error
Last active April 14, 2017 21:04
Reproduce Fluentd fluent-plugin-flowcounter 0.4.2 error
This is intended to be executed like this:
./build.sh &
docker run --log-driver=fluentd --log-opt tag="docker.{{.ID}}" --log-opt fluentd-address="$(docker inspect -f '{{.NetworkSettings.IPAddress}}' custom-docker-fluent-logger):24224" python:alpine echo Hello
@StevenACoffman
StevenACoffman / Docker Fluentd with FlowCounter and Statsd.md
Last active April 19, 2017 16:53
Docker Fluentd Flowcounter Statsd (or Graphite) example

This is an example of making fluentd count log messages and emit to graphite.

Run in a terminal:

# start graphite statsd
docker run -d --name graphite --restart=always -p 80:80 -p 2003-2004:2003-2004 -p 2023-2024:2023-2024 -p 8125:8125/udp -p 8126:8126 hopsoft/graphite-statsd
# start fluentd container
./build.sh
@StevenACoffman
StevenACoffman / Elasticsearch vs Solr.md
Last active April 20, 2017 18:44
Elasticsearch vs Solr