Skip to content

Instantly share code, notes, and snippets.

# Create a RDS database using the new V2 Serverless engine
aws rds create-db-cluster \
--db-cluster-identifier serverless-v2-cluster \
--region ap-southeast-2 \
--availability-zones ap-southeast-2a ap-southeast-2b ap-southeast-2c \
--engine aurora-postgresql \
--engine-version 13.6 \
--storage-encrypted \
--master-username postgresql \
@daleobrien
daleobrien / KSUID.vtl
Last active December 19, 2020 09:09
Create a KSUID when using a resolver in DynamoDB
### Create a KSUID
## KSID is 274 Billion times larges than UUID.
## Every second KSID has 64 times the number of ids that UUID has over it's entire key space.
#set($characters="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz")
##
## Create a new UUID
## Of the form xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx, M&N combine to make 6 bits that don’t change
## So, UUID has only 122bit of random, so combine two to make it fully 128bit
#set($uuid1=$util.autoId())
#set($uuid2=$util.autoId())
### Keybase proof
I hereby claim:
* I am daleobrien on github.
* I am daleobrien (https://keybase.io/daleobrien) on keybase.
* I have a public key whose fingerprint is ED39 D96C 6A52 88D0 416B E834 E9D1 BEF1 2EB8 ABEB
To claim this, I am signing this object:
'''
svg_font_to_reactjs
Convert a svg fonttello font file into a ReactJS file full of react classes.
They can then be used:
import Wifi from './Font';
<Wifi width={32} height={32}/>
Usage:
'''
Update your ssh keys for a given client.
e.g.
python update_ssh_config.py qgc
Usage:
update_ssh_config.py <client>
'''
from docopt import docopt
@daleobrien
daleobrien / IKEv2.mobileconfig
Created October 9, 2016 05:30 — forked from zqqf16/IKEv2.mobileconfig
strongSwan IKEv2 for iOS without certificate
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>IKEv2</key>
<dict>
<key>AuthName</key>
-- Postgres 9.5.3.0 on OSX
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
DROP TABLE IF EXISTS u, v, i, j, m, n;
-- Tables
CREATE TABLE u (uuid UUID PRIMARY KEY, x INT, y INT);
CREATE TABLE v (uuid UUID PRIMARY KEY, x INT, y INT);
CREATE TABLE i (id SERIAL PRIMARY KEY, x INT, y INT);
@daleobrien
daleobrien / install_git.sh
Created June 14, 2016 23:14
install git 2.9 on OSX
cd ~/Downloads
wget https://www.openssl.org/source/openssl-1.0.2h.tar.gz
tar -xvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./Configure darwin64-x86_64-cc
make depend -j4
sudo make install
cd ~/Downloads
#!/bin/bash
# =========================================================
# celerybeat - Starts the Celery periodic task scheduler.
# =========================================================
#
# :Usage: /etc/init.d/celerybeat {start|stop|force-reload|restart|try-restart|status}
# :Configuration file: /etc/default/celerybeat or /etc/default/celeryd
#
# See http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#generic-init-scripts
#!/bin/sh -e
# ============================================
# celeryd - Starts the Celery worker daemon.
# ============================================
#
# :Usage: /etc/init.d/celeryd {start|stop|force-reload|restart|try-restart|status}
# :Configuration file: /etc/default/celeryd
#
# See http://docs.celeryq.org/en/latest/cookbook/daemonizing.html#init-script-celeryd