Skip to content

Instantly share code, notes, and snippets.

View davdunc's full-sized avatar

David Duncan davdunc

View GitHub Profile
@davdunc
davdunc / keybase.md
Last active January 31, 2020 13:02
keybase.md

Keybase proof

I hereby claim:

  • I am davdunc on github.
  • I am davdunc (https://keybase.io/davdunc) on keybase.
  • I have a public key ASBTRSmUWf3_gY-ZnEcykmDWtwctE0jOzLuoA-qAF74IUQo

To claim this, I am signing this object:

# CentOS Images
aws --region us-east-2 ec2 describe-images --owners aws-marketplace --filters Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce --query 'Images[*] | sort_by(@, &CreationDate) | [-1]'
# Ubuntu 14.04 AMI Most recent image from 2016
aws ec2 describe-images --owners 099720109477 --Filters "Name=name,Values=*-trusty-14.04-*" "Name=root-device-type,Values=ebs" "Name=creation-date,Values=2016-*" --query 'Images[*] | sort_by(@, &CreationDate) | [-1].{Arch:Architecture, CreationDate:CreationDate, ImageId: ImageId}'
#Ubuntu 16.04 AMI Most recent images
aws ec2 describe-images --filters "Name=owner-id,Values=099720109477" "Name=name,Values=*hvm-ssd*-xenial-16.04-*" "Name=root-device-type,Values=ebs" "Name=creation-date,Values=2016-09-*" --query 'Images[*] | sort_by(@, &CreationDate) | [-1].{Arch:Architecture, CreationDate:CreationDate, ImageId: ImageId, Name: Name}' --region us-east-1
@davdunc
davdunc / snapcraft.yaml
Last active July 10, 2017 12:04 — forked from evandandrea/snapcraft.yaml
amazon-ssm-agent
# Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the
# "License"). You may not use this file except in compliance
# with the License. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
@davdunc
davdunc / snapcraft-ssm-agent.out
Last active October 30, 2017 21:24
snapcraft output
ubuntu@ip-10-0-0-244:~/sandbox/amazon-ssm-agent$ snapcraft
Preparing to pull ssm-agent
Pulling ssm-agent
Preparing to build ssm-agent
Building ssm-agent
/home/ubuntu/sandbox/amazon-ssm-agent/parts/ssm-agent/go/src/github.com/aws/amazon-ssm-agent/Tools/src/checkstyle.sh
Run checkstyle script
Run 'gofmt'
Try update 'goimports'
Run 'goimports'
AWSTemplateFormatVersion: '2010-09-09'
Metadata: {}
Parameters:
###########
KeyName:
Description: The EC2 Key Pair to allow SSH access to the instance
Type: 'AWS::EC2::KeyPair::KeyName'
AvailabilityZone:
Description: Availability zone to deploy
@davdunc
davdunc / gist:59c93ae273d3665471d76307adf27f6a
Created February 12, 2019 04:42
minishift 1.31.0: Unable to install firewalld
davdunc@laptop:~/bin$ minishift start --vm-driver generic --remote-ipaddress 3.17.74.166 --remote-ssh-user ec2-user --remote-ssh-key ~/.ssh/minishift-test-key.pem -v 5 --show-libmachine-logs
-- minishift version: v1.31.0+cfc599c
-- Starting profile 'minishift'
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'generic' hypervisor ...
-- Preparing Remote Machine ....Couldn't set key PLATFORM_ID, no corresponding struct field found
Couldn't set key CPE_NAME, no corresponding struct field found
Couldn't set key , no corresponding struct field found
Couldn't set key REDHAT_BUGZILLA_PRODUCT, no corresponding struct field found
Couldn't set key REDHAT_BUGZILLA_PRODUCT_VERSION, no corresponding struct field found
@davdunc
davdunc / awscli.spec
Created February 14, 2019 23:33
Diff from AWSCLI for latest contribution
diff --git a/.gitignore b/.gitignore
index 85677cc..c38a61f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -92,3 +92,5 @@
/awscli-1.16.28.tar.gz
/awscli-1.16.57.tar.gz
/awscli-1.16.85.tar.gz
+/awscli-1.16.97.tar.gz
+/awscli-1.16.101.tar.gz
@davdunc
davdunc / gist:1e22541eef32b1072833fd70d3a353d1
Created July 7, 2020 18:54
output from error on cluster creation
AWS_PROFILE=moa
moactl create cluster --interactive
I: Interactive mode enabled.
Any optional fields can be left empty and a default will be selected.
? Cluster name: moa-davdunc-test-1
? AWS region: eu-west-1
? OpenShift version:
? Multiple availability zones: Yes
? Compute nodes instance type: [Use arrows to move, type to filter, ? for more ? Compute nodes instance type:
@davdunc
davdunc / gist:b013de7b8c3533f8cf915b35da5740f2
Created October 28, 2020 04:16
get the cloud-9 endpoints for us-east-2
wget -q -O - https://ip-ranges.amazonaws.com/ip-ranges.json | \
jq -Mr '.prefixes | unique_by(.ip_prefix) | .[] | select(.service=="CLOUD9") | select(.region=="us-east-2").ip_prefix'
@davdunc
davdunc / Makefile
Created September 11, 2021 04:46 — forked from isaacs/Makefile
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.