Skip to content

Instantly share code, notes, and snippets.

View andyspicer's full-sized avatar

Andy Spicer andyspicer

View GitHub Profile
;; Credit: Duncan Halliday https://members.iracing.com/jforum/posts/list/1925/3552959.page#11764145
;; FFB UP
#IfWinActive, ahk_exe iRacingSim64DX11.exe
6Joy23::
IfWinExist ahk_exe irFFB.exe
{
WinActivate
Sleep, 100 ;
@andyspicer
andyspicer / docker-swarm-ports.md
Created August 14, 2017 04:17 — forked from BretFisher/docker-swarm-ports.md
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

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.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication
  • UDP port 4789 for "data plane" VXLAN overlay network traffic

AWS Security Group Example

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.

Keybase proof

I hereby claim:

  • I am andyspicer on github.
  • I am andyspicer (https://keybase.io/andyspicer) on keybase.
  • I have a public key ASDoIGGW0SpapXFqAryeupqbK7RYObU3ev-0M_I-2Kx6mwo

To claim this, I am signing this object:

@andyspicer
andyspicer / install.sh
Last active December 23, 2017 21:17 — forked from mkubenka/install.sh
OpenVPN Access Server Letsencrypt
#!/bin/sh
apt-get -y install git bc
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
mkdir /etc/letsencrypt
#!/usr/bin/env bash
# Script to reverse engineer the build of a given Debian / Ubuntu server
# I do this all the time: take an existing server, create a Bash / Ansible / Puppet / Chef
# built script, to allow Continuous Depoyment.
# It's tedious, but this script will give you the basics to get started.
# Make sure you have "sudo" access to get all the details.
# setup folders
@andyspicer
andyspicer / service-checklist.md
Created November 14, 2016 15:07 — forked from marktheunissen/service-checklist.md
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@andyspicer
andyspicer / pedantically_commented_playbook.yml
Created November 14, 2016 15:06 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@andyspicer
andyspicer / gist:209635a1869a957c72e16ae1d5b4b9a5
Created October 30, 2016 00:00 — forked from dweeber/gist:3748975
Bash script uses vcgencmd on Raspberry Pi with bc to calculate F value of Temp
#!/bin/bash
######################################################################
# Raspberry Pi
#
# Gross Script by Dweeber (Kevin Reed) <dweeber.dweebs@gmail.com>
# V1.0 2012-09-19
#
# Use the vcgencmd to obtain the Temp of the SOC
# then calculates the F value using bc.
#
@andyspicer
andyspicer / onchange.sh
Created October 22, 2016 02:45 — forked from senko/onchange.sh
Watch current directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of

macOS 10.12 Sierra Setup

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your o