Skip to content

Instantly share code, notes, and snippets.

View atward's full-sized avatar

Adam Ward atward

  • Melbourne, Australia
View GitHub Profile
@atward
atward / POK3R-Default-v1_14.kbd.json
Last active November 11, 2015 18:11
POK3R Default v1.14
[
{
"name": "POK3R Default v1.14",
"author": "Vortex"
},
[
{
"c": "#3c4041",
"t": "#aba18b",
"p": "DCS",
@atward
atward / POK3R-Default.kbd.json
Last active November 11, 2015 18:11
POK3R Default
[
{
"name": "POK3R Default",
"author": "Vortex"
},
[
{
"y": 1.5,
"c": "#3c4041",
"t": "#aba18b",
@atward
atward / POK3R-Layer-2-Windows.kbd.json
Last active November 11, 2015 18:11
POK3R Layer 2 Windows
[
{
"name": "POK3R Layer 2 Windows",
"author": "sublimal",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX1A-C1xx",
"plate": true
},
[
@atward
atward / POK3R-Layer-3-OSX.kbd.json
Last active May 7, 2017 22:14
POK3R Layer 3 OSX
[
{
"name": "POK3R Layer 3 OSX",
"author": "sublimal",
"switchMount": "cherry",
"switchBrand": "cherry",
"switchType": "MX1A-C1xx",
"plate": true
},
[
@atward
atward / source_tfvars.sh
Last active July 13, 2021 11:48
Rudimentary parsing of terraform tfvars in bash
#!/bin/bash
# source: https://gist.github.com/atward/7a2eb1b4a78fbaebe585
# here be dragons: this is as dangerous as it looks
## terraform variable defaults
# takes *.tf and assigns env=default (if any)
# - map not supported (obvious reasons)
# - Tested on Darwin sed(1) only
function source_tfdefaults() {
eval "$(
#cloud-init
# https://docs.chef.io/packages.html#enterprise-linux
# vendor chef-repo to /var/lib/chef with cookbooks in /var/lib/chef/cookbooks
yum_repos:
chef-stable:
name: chef-stable
baseurl: https://packages.chef.io/stable-yum/el/7/\$basearch/
enabled: true
failovermethod: priority
@atward
atward / cf-templater.yaml
Last active January 24, 2017 04:02
CloudFormation Templating Custom Resource
# NOTE: there is a 4k CustomResource response limit, so keep all templates well under that
AWSTemplateFormatVersion: 2010-09-09
Description: 'CloudFormation Templating Custom Resource'
Resources:
TemplateFunctionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: 2012-10-17
@atward
atward / asg-suspend.yaml
Last active November 20, 2016 22:27
AWS CustomResource example - Autoscaling group suspend/resume processes
AWSTemplateFormatVersion: 2010-09-09
Description: 'Custom resource example - ASG suspend/resume'
Parameters:
Input:
Type: String
Description: Make ASG
Default: true
AllowedValues: [true, false]
@atward
atward / custom-resource.yaml
Created November 21, 2016 04:04
AWS Custom resource example. Multiplies number by 42
AWSTemplateFormatVersion: 2010-09-09
Description: 'Custom resource test'
Parameters:
Value:
Type: Number
Description: input a number
Default: 1
Resources:
@atward
atward / aws-console
Last active August 8, 2022 02:10
AWS Web console login via boto credentials (IAM access token/profile)
#!/usr/bin/env python
import boto3
import json
import sys
import urllib2
import webbrowser
from urllib import urlencode