Skip to content

Instantly share code, notes, and snippets.

View hairyhenderson's full-sized avatar

Dave Henderson hairyhenderson

View GitHub Profile

Keybase proof

I hereby claim:

  • I am hairyhenderson on github.
  • I am dhenderson (https://keybase.io/dhenderson) on keybase.
  • I have a public key whose fingerprint is 2260 0E46 075B 2060 41E8 F730 407C CDEE 9AB1 B536

To claim this, I am signing this object:

#cloud-config
rancher:
network:
dns:
nameservers:
- 1.2.3.4
class mymodule {
exec { 'do something':
command => "echo ${::mymodule::foo}"
}
}
provider "aws" {
region = "us-east-1"
}
provider "aws" {
alias = "us-east-1"
region = "us-east-1"
}
provider "aws" {
@hairyhenderson
hairyhenderson / docker-compose.yml
Last active August 28, 2016 13:49
Why u no like redirect???
version: '2'
services:
web:
restart: always
image: emilevauge/whoami
labels:
- "traefik.port=80"
- "traefik.frontend.rule=Host:hairyhenderson.ca"
const async = require('async')
function waitForUpdate (appId, updatedInitial) {
var updated = updatedInitial
return new Promise((resolve, reject) => {
async.whilst(
() => updated === updatedInitial,
(callback) => {
getLastUpdated(appId, (err, lastUpdated) => {
if (err) {
rancher:
image: rancher/server
restart: always
environment:
- CATTLE_DB_CATTLE_MYSQL_HOST=dave-rancher-db.c6rqbjezfojf.us-east-1.rds.amazonaws.com
- CATTLE_DB_CATTLE_MYSQL_PORT=3306
- CATTLE_DB_CATTLE_MYSQL_NAME=rancher
- CATTLE_DB_CATTLE_USERNAME=rancherdb
- CATTLE_DB_CATTLE_PASSWORD=rancherdb
ports:
@hairyhenderson
hairyhenderson / d4aws_connect.sh
Last active April 19, 2019 15:09
A helper script to connect to a Docker for AWS manager node for running `docker` commands
#!/bin/bash
#
# A helper script to connect to a Docker for AWS manager node for running `docker` commands
#
# There's a few things going on here:
# 1. it figures out a swarm manager's address using the AWS API
# 2. it controls an SSH tunnel to Docker's API socket on that manager node, so that `docker` commands (such as `docker stack deploy`)
# can be directed at that node
#
# Prerequisites:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
version: '3.1'
services:
one:
image: nginx
networks:
- one
two:
image: nginx
networks: