Skip to content

Instantly share code, notes, and snippets.

View justinclayton's full-sized avatar

Justin Clayton justinclayton

View GitHub Profile
@matt-deboer
matt-deboer / Bakefile
Last active September 2, 2016 22:33
Bakefile to create a docker 1.12 swarm on OSX with docker-machine-driver-xhyve support
#!/bin/bash
set -u
#. creates a new swarm. params name, [driver], [workers], [managers]
create-swarm() {
bake_params name
local driver=${driver:=virtualbox}
local workers=${workers:=2}
local managers=${managers:=1}
@sjparkinson
sjparkinson / RDS-Aurora-CloudFormation-Example.yaml
Last active May 10, 2022 10:43
A basic CloudFormation template for an RDS Aurora cluster.
---
AWSTemplateFormatVersion: 2010-09-09
Description: >
A basic CloudFormation template for an RDS Aurora cluster.
Parameters:
DatabaseUsername:
AllowedPattern: "[a-zA-Z0-9]+"
ConstraintDescription: must be between 1 to 16 alphanumeric characters.
@jokeru
jokeru / aws_delete-default-vpc.sh
Created March 31, 2018 15:14
Script to delete all AWS default VPCs from all regions using AWS CLI
#!/usr/bin/env bash
if [ "$AWS_PROFILE" = "" ]; then
  echo "No AWS_PROFILE set"
  exit 1
fi
for region in $(aws ec2 describe-regions --region eu-west-1 | jq -r .Regions[].RegionName); do
@zanedeg
zanedeg / aync.js
Created June 1, 2018 00:10
NodeJS async comparisons
'use strict';
const promisify = require('util').promisify;
const delay = (interval, cb) => {
console.log(`Waiting ${interval}s`);
setTimeout(() => cb(null, interval), interval);
}
const delayAsync = promisify(delay);
@XargonWan
XargonWan / japanese_locale_enabler.sh
Last active May 4, 2024 20:25
Enable Japanese locale on Steam Deck
#!/bin/bash
# This script is enabling (uncommenting) the Japanese locale and regenerates them
sudo steamos-readonly disable
sudo pacman-key --init
sudo pacman-key --populate archlinux
sudo pacman -S glibc
sudo sed -i "s%#ja_JP.UTF-8 UTF-8%ja_JP.UTF-8 UTF-8%" /etc/locale.gen
sudo locale-gen