Skip to content

Instantly share code, notes, and snippets.

Deploying canaries

Stefanie Grunwald moertel

Deploying canaries
View GitHub Profile
moertel / Dockerfile
Last active Sep 20, 2019
cstore_fdw: ERROR: cache lookup failed for type 0 (Steps to reproduce)
View Dockerfile
FROM postgres:9.6.9
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
ca-certificates \
curl \
apt-transport-https \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN curl --silent --show-error --fail '' > /etc/apt/sources.list.d/citusdata_community.list \
&& curl --silent --location-trusted | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add - \
moertel /
Last active Nov 24, 2020
Try Vault with MySQL storage backend (via Docker)

Initialise (will return keys and a token)

curl -X PUT --data '{"secret_shares":1, "secret_threshold":1}'

Use one of the keys to unseal

curl -X PUT --data '{"key":"a5e665962f544dd16471c120c5500a7906cfbaeb3f18ae0fc6c5c71d444f0a90"}'

Use the root token to store something

moertel /
Last active Jul 16, 2016
Display a postgreSQL result set as bar chart
#!/usr/bin/env python
from optparse import OptionParser
import sys
import re
import colorama
# Original output:
# $ psql -c "select '2016-07-01'::date, 37483::int as value union select '2016-07-02'::date, 121782::int as value;"
# date | value

Keybase proof

I hereby claim:

  • I am moertel on github.
  • I am moertel ( on keybase.
  • I have a public key whose fingerprint is 8913 A5D5 63A4 C542 23AC 3AA5 170B D551 B997 AB1B

To claim this, I am signing this object:

moertel / deobfuscate_gclid.php
Created Apr 22, 2014
decode google click id
View deobfuscate_gclid.php
function gclid_decode($gclid, $splitTimestamp = true)
// Copyright 2013 Deed Poll Office Ltd, UK <>
// Licensed under Apache Licence v2.0 <>
\xdd\xe5\xed\xf5\xfd]) # 32-bit wire type
([\x80-\xff]*[\0-\x7f])(.{4}) |
moertel / suppress_ruby_output.rb
Last active Feb 2, 2021
Temporarily suppress STDOUT and STDERR (ruby)
View suppress_ruby_output.rb
# Temporarily redirects STDOUT and STDERR to /dev/null
# but does print exceptions should there occur any.
# Call as:
# suppress_output { puts 'never printed' }
def suppress_output
original_stderr = $stderr.clone
original_stdout = $stdout.clone
$stderr.reopen('/dev/null', 'w'))
$stdout.reopen('/dev/null', 'w'))
moertel / assignment.tex
Last active Dec 23, 2015 — forked from matth/assignment.tex
LaTeX document class definition and example script for Open University assignments (TMA)
View assignment.tex
\student{My Name}
\date{January 20, 2011}