Skip to content

Instantly share code, notes, and snippets.

@3lixy
3lixy / history_stuff.sql
Created August 20, 2024 18:08 — forked from slotrans/history_stuff.sql
Building blocks for generic history-keeping in Postgres.
/*
Replace "your_schema" with whatever schema is appropriate in your environment.
It is possible to use "public"... but you shouldn't!
*/
/*
Function to stamp a "modified" timestamp. Adjust the name to suit your environment,
but that name is hard-coded so it is assumed that you only use _one_ such name.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

#!/bin/bash
#
# This script will install ansible including sshpass for --ask-pass functionality
# under cygwin.
# Before running this install cygwin and select lynx package to be install.
#
# Script Starts Here
#
#
# fetch apt-cyg via lynx
@3lixy
3lixy / gist:846bccc43304c1af44ce71b718606aea
Created February 10, 2018 16:17 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

Organization & Common Name: Some human identifier for this server CA.

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
@3lixy
3lixy / ca.md
Created February 10, 2018 15:53 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.