Skip to content

Instantly share code, notes, and snippets.

@rowleyaj
rowleyaj / import
Created October 10, 2017 11:28
AWS IAM Import -> Terraform
#!/bin/bash
pgname=$0
LOG_INFO=false
#
# Colours
#
RED="\\033[31m"
GREEN="\\033[32m"
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 30
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: stale
@rowleyaj
rowleyaj / Twitter TOS Diff
Created September 6, 2017 11:52
September 2017 -> October 2017 from https://twitter.com/en/tos
$ diff old new | fold -sw 120
15c15
< 5. Disclaimers and Limitations of Liability
---
> 5. Limitations of Liability
28c28,30
< Twitter respects the intellectual property rights of others and expects users of the Services to do the same. We
reserve the right to remove Content alleged to be infringing without prior notice, at our sole discretion, and without
liability to you. We will respond to notices of alleged copyright infringement that comply with applicable law and are
properly provided to us, as described in our Copyright policy (https://support.twitter.com/articles/15795). If you
@rowleyaj
rowleyaj / README.md
Last active February 11, 2022 20:19
Terraform S3 Backend

Testing the S3 backend + DynamoDB locking

  1. Clone this gist and change directory to it
  2. Rename run-2nd.tf to an alternative file ending to prevent it being run.
  3. terraform init
  4. Normally you would plan and save to a file but for this example we're going to just apply directly terraform apply
  5. Rename run-2nd.tf back to it's original name
  6. The backend has changed so requires a new terraform init
  7. terraform apply

Keybase proof

I hereby claim:

  • I am rowleyaj on github.
  • I am rowleyaj (https://keybase.io/rowleyaj) on keybase.
  • I have a public key whose fingerprint is 0CD9 9CAB 6B6D 8535 2104 7FEC 01CF F025 0AE0 A256

To claim this, I am signing this object:

@rowleyaj
rowleyaj / Services.md
Created October 23, 2014 17:08
AWS Service Names to IAM Actions

A list of AWS service names to IAM names for use in policies.
I created this list from the policy generator as I couldn't find any documentation anywhere that lists these details.

Service Name IAM name
AWS Billing aws-portal
AWS Cloud Formation cloudformation
AWS CloudTrail cloudtrail
AWS Direct Connect directconnect
# Description:
# This script receives pages in the formats
# /usr/bin/curl -d host="$HOSTALIAS$" -d output="$SERVICEOUTPUT$" -d description="$SERVICEDESC$" -d type=service -d notificationtype="$NOTIFICATIONTYPE$ -d state="$SERVICESTATE$" $CONTACTADDRESS1$
# /usr/bin/curl -d host="$HOSTNAME$" -d output="$HOSTOUTPUT$" -d type=host -d notificationtype="$NOTIFICATIONTYPE$" -d state="$HOSTSTATE$" $CONTACTADDRESS1$
#
# Based on a gist by oremj (https://gist.github.com/oremj/3702073)
#
# Configuration:
# HUBOT_NAGIOS_URL - https://<user>:<password>@nagios.example.com/cgi-bin/nagios3
#
@rowleyaj
rowleyaj / stylesheet.css
Created August 8, 2014 13:29
Hacked up stylesheet for Jira to make it more like Trello
#ghx-board-name {
color: #F6F6F6;
}
#ghx-header {
background-color: #23719F;
}
#ghx-operations {
background-color: #23719F;
/*
Call start() on console to run program.
May be a little rough around the edges, I'm trying to remember the
jQuery API from memory as my home internet's too slow to Google stuff.
Oh and it requires jQuery, because everything requires jQuery!
*/
function start() {
@rowleyaj
rowleyaj / README.md
Created January 8, 2014 17:49
NPM Proxy Cache

Setup an NPM Proxy Cache

See https://npmjs.org/package/npm-proxy-cache for more info

apt-get install node npm
npm install npm-proxy-cache -g
#do in screen/tmux or run as background process/service (ideally):
npm-proxy-cache -h 0.0.0.0 -p 14441 -t 604800 -v