Skip to content

Instantly share code, notes, and snippets.

-- 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 / 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>
'''
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
'''
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:
### 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:
@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())
# 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 \