Skip to content

Instantly share code, notes, and snippets.

@tomgidden
tomgidden / [email protected]
Created October 19, 2024 03:18
systemd file for docker compose, with added dereference of symlinks
[Unit]
Description=%i service with docker compose
Requires=docker.service
After=docker.service network-online.target autofs.service
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory=/etc/docker/compose/%i
ExecStart=/bin/sh -c 'cd "$(dirname $(realpath /etc/docker/compose/%i/compose.yml))" && docker compose up -d --remove-orphans'
@tomgidden
tomgidden / a4_graph_paper.pdf
Last active September 30, 2024 10:31
Emergency A4 graph paper
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tomgidden
tomgidden / Terminal window colour from context
Last active June 20, 2024 00:40
.zshrc file (or /etc/zshrc) to automatically change terminal colour and prompt for different tabs/windows or remote hosts
### ------------------------------------------------------------------------
### Terminal window colour from context
### https://gist.github.com/tomgidden/f6e11571d4f6e52faa45ebecc4d18a7b
# https://www.xfree86.org/current/ctlseqs.html
# Italic: "\x1b[38;2;3m"
# Bright: "\x1b[38;2;0m"
tty_color () {
local C=$1
@tomgidden
tomgidden / mitigate_CVE-2024-2961.sh
Last active May 10, 2024 15:18
Shell Script or Ansible playbook to mitigate issues with CVE-2024-2961
#!/bin/sh
# Test if CN-EXT charsets are enabled
if ( iconv -l | egrep -q 'CN-?EXT' ); then
# Comment out CN-EXT charsets in gconv-modules config
find /usr/lib* \( -path '*/gconv-modules' -o -path '*/gconv-modules-extra.conf' \) \
-exec sed '/^\([^#].*\)\?\(CNEXT\|CN-EXT\)/ s/^/###mitigate_CVE-2024-2961: /g' -i {} \;
# Rebuild gconv-modules.cache

"If I whisk it awwww, could you bweak my fawwww?

Howdowahruh? Howdowahbrie? I am naahrrimam suffocating.

I wannafewah. Rufuwahblah.

Tell me is this wuhuhkifiuhlah.

American Pancake recipe

I tend to measure this easily by weight... put a bowl on the scales, tare the scale (ie. zero it), and then shove stuff in by weight, taring each time.

  • 130g self-raising flour (or plain flour + 2 tsp baking powder)
  • 1/2 tsp salt (~5g)
  • 2 tbsp sugar (~25g)

Lyrics to “Prisencolinensinainciusol” by Adriano Celentano

Ye de col mais saiwan,
Prisencolinensinainciusol;
Ol rait!

Oui de seim deshus nau hobil de sei menna,
Holre mebbe debe colobos daim;
Brrrrrr - chez a maind beghin de col,
Bebi de stay yeah pih-jo oh.

Movie Haiku

  • I dreamed a dream where
    Crowe could sing! When Oscar nods
    required good acting.

  • Corningstone Lady:
    Stay Classy, Whale's Vagina.
    Scotchy scotch scotch scotch.

My post-rationalisation for this is that when testing fountain pens and inks, it's good to have things to write. Pangrams are traditional, but I really just tend to write “unilluminating minimum aluminium”. And the lyrics to “Prisencolinensinainciusol” is something I've tried several times to write out neatly... one day I'll do it.

  • Ugh. False equivalence makes my bile ooze with extreme prejudice

  • Queen Elizabeth intoxicatedly vowed, "Mick Jagger is perfect!"

  • Just a few expectorant lozenges quickly abbreviated my cough.

  • Alexander Hamilton and Thomas Jefferson's political views quickly begat sleaze

Cabelteiss, cabelteiss,
Tie your cables discreetly;
Neat and tight,
Black or white;
Buy them at Lidl quite cheaply!
Fastener of cable
both fast and slow:
AC power and Ether;
Cabelteiss, cabelteiss,