Skip to content

Instantly share code, notes, and snippets.

It was just another bad Friday. Harry and Tom, who were sworn enemies since nursery, were sat grumpily in their chairs at the back of Mr Nutty’s maths lesson . BBRRRRRIIIIIIINNNNGGGGG, break time - Harry zoomed to his favourite tree, on the other side of the tree was Tom “what are YOU doing here”? Exclaimed Harry. ”It’s not just your tree you know, I’m not dumb” say’s Tom. “Well that’s news to me” whispered Harry. “Listen, I want to be friends with you because I don’t like this war between me and you” exclaims Tom “friends”? “SURE” shouts Harry in excitment. “I wish something exciting would happen for once” they both say.
The ground started to rumble…CRACK!!!! “Boys, over here”shouts Mr Nutty! They started to run to Mr Nutty…CRRRRAAAAACCCCKKKKKK, Tom slipped into the crack “Harry HELP” Tom bellows… “I’m coming hold on”shouts Harry !!! Harry reached Tom and pulled him out with his strength
( Harry lifts weights for 5 mins every day). They got to Mr Arnold just in time. The earthquake stopped. “I think I’m ok
@ranguard
ranguard / YOURUSER-env.json
Last active January 23, 2022 01:57
CDK + SAM for local lambda devel
{
"FUNCTION_REFERENCE_FROM_TEMPLATE": {
"SOME_ENV_KEY: "and-the-value-a-bucket-name-for-example"
}
}
name: PR Build
# This job runs on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
id: checkout
- name: setup_node
uses: actions/setup-node@v1
with:
version: 10.16
@ranguard
ranguard / cdk_envs.md
Last active December 6, 2020 19:26
Pattern for deploying stacks to multiple environments
const envs:any = {
    dev: { region: 'eu-west-1', account: 'xxx' },
    production: { region: 'eu-west-1', account: 'yyy' },
};

class MyApp extends cdk.Construct {
    constructor(scope:any, id:any, props:any ) {
        super(scope, id);

Keybase proof

I hereby claim:

  • I am ranguard on github.
  • I am ranguard (https://keybase.io/ranguard) on keybase.
  • I have a public key ASDxHhcIyTuLwfjxJdyRY4AzsGKTSHxwuCRhcdzFD4yVqQo

To claim this, I am signing this object:

@ranguard
ranguard / lw_os_upgrade_plan.md
Last active May 19, 2018 19:56
Rough plan o

Plan for upgrading OS on Liquid Webservers (LW)

Migrate production to use Bytemark (BM) cluster (also has the advantage that 2 are SSDs) before any upgrade.

Migration plan

Setup:
  1. setup SSD on bm-01 and 02 to be used for ES data
  2. snapshot ES on LW

Wheezy

DELETE PUPPET FROM CRON

puppet agent --disable

checkout /etc/puppet to origin/oalders/stretch

sudo apt-get update && sudo apt-get upgrade

$ORIGIN metacpan.org.
@ 3600 SOA ns1.p24.dynect.net. (
hostmaster.metacpan.org. ; address of responsible party
2018011900 ; serial number
3600 ; refresh period
600 ; retry period
604800 ; expire time
60 ) ; minimum ttl
86400 NS ns1.p24.dynect.net.
86400 NS ns2.p24.dynect.net.
$ORIGIN metacpan.org.
@ 3600 SOA ns1.p24.dynect.net. (
hostmaster.metacpan.org. ; address of responsible party
2018011700 ; serial number
3600 ; refresh period
600 ; retry period
604800 ; expire time
60 ) ; minimum ttl
86400 NS ns1.p24.dynect.net.
86400 NS ns2.p24.dynect.net.