Skip to content

Instantly share code, notes, and snippets.

@pwaller
pwaller / gist:f80063a253a9106cccbd
Created March 30, 2015 16:41
Determine the latest CoreOS AMI available
#!/bin/sh
COREOS_CHANNEL=stable
BASE=http://$COREOS_CHANNEL.release.core-os.net/amd64-usr
AWS_REGION=eu-west-1
COREOS_VERSION=$(curl -s $BASE/current/version.txt | sed -n 's/COREOS_VERSION=//p')
parse_ami() {
jq -r ".amis | map(select(.name == \"$AWS_REGION\")) | .[].hvm"
}
@kraftb
kraftb / generate-keypair.sh
Created April 1, 2014 16:49
Generate public/private keypair and output to stdout
#!/bin/bash
BITS=2048
# In one line:
# rm -f temp.key && ssh-keygen -t rsa -b 2048 -f temp.key -N "" -q && ssh-keygen -e -f temp.key -m PKCS8 | tr "\n" " " && echo && cat temp.key | tr "\n" " " && echo
# In multiple lines:
rm -f temp.key
ssh-keygen -t rsa -b $BITS -f temp.key -N "" -q
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active February 7, 2026 19:32 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.