Skip to content

Instantly share code, notes, and snippets.

View chrisminton's full-sized avatar

Chris Minton chrisminton

  • Sainsbury's
  • London
View GitHub Profile
@chrisminton
chrisminton / gist:26cc4e209ae0454b59ecde420e3cbb2c
Created January 19, 2018 15:49 — forked from hummus/gist:8592113
aws cli + jq example
wget http://stedolan.github.io/jq/download/linux64/jq
aws ec2 describe-instances --filters "Name=tag:Name,Values=$NAME" \
"Name=instance-state-name,Values=running" \
| jq -r \
".Reservations[] | .Instances[] | .InstanceId" \
aws ec2 describe-volumes --filters \
"Name=status,Values=available" \
| jq -r ".Volumes[] | .VolumeId" \
@chrisminton
chrisminton / gist:5868205a4459a4940eb880a2a5b2dd4e
Created December 20, 2017 23:29 — forked from kyledrake/gist:d7457a46a03d7408da31
Creating a self-signed SSL certificate, and then verifying it on another Linux machine
# Procedure is for Ubuntu 14.04 LTS.
# Using these guides:
# http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/
# https://turboflash.wordpress.com/2009/06/23/curl-adding-installing-trusting-new-self-signed-certificate/
# https://jamielinux.com/articles/2013/08/act-as-your-own-certificate-authority/
# Generate the root (GIVE IT A PASSWORD IF YOU'RE NOT AUTOMATING SIGNING!):
openssl genrsa -aes256 -out ca.key 2048
openssl req -new -x509 -days 7300 -key ca.key -sha256 -extensions v3_ca -out ca.crt
@chrisminton
chrisminton / curl-format.txt
Last active November 15, 2017 14:40
Curl Format file for testing round-trip times, use with `curl -w "@curl-format.txt" -o /dev/null -s http://website`
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
time_starttransfer: %{time_starttransfer}\n
----------\n
time_total: %{time_total}\n
\n
@chrisminton
chrisminton / gist:e1a9477269e4e21b021e7b38e40cb573
Last active December 9, 2016 17:26
Terraform aws_iam_role debug
module.consul.aws_iam_role_policy.consul_role_policy: Destroying...
module.consul.aws_iam_role_policy.consul_role_policy: Destruction complete
Error applying plan:
1 error(s) occurred:
* aws_iam_role.consul_role: diffs didn't match during apply. This is a bug with Terraform and should be reported as a GitHub Issue.
Please include the following information in your report:
@chrisminton
chrisminton / tmux.md
Created October 27, 2016 10:19 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a