Skip to content

Instantly share code, notes, and snippets.

@maxaudron
maxaudron / backup.sh
Last active November 7, 2021 15:09
Make backups and clean up old ones using the grandfather-father-son principle
#!/bin/bash
# Make backups and clean up old ones using the grandfather-father-son principle
#
# Keeps one backup per four weeks ( roughly one per month ) for a year
# per week for four weeks
# per day for one week
#
# DRYRUN="yes" BACKUP_CONTEXT="/home/user" backup.sh BACKUP_SRC BACKUP_DEST
#
# DRYRUN: when set nothing is actually done, useful for testing
@maxaudron
maxaudron / tlmp.helmfile.yaml
Created January 3, 2021 10:18
Totally Legal Media Procurement on K8s
repositories:
- name: cocainefarm
url: https://kube.cat/chartrepo/cocainefarm
templates:
default: &default
chart: cocainefarm/{{`{{ .Release.Name }}`}}
namespace: tlmp
releases:
@maxaudron
maxaudron / compiler-builtins-32bit-int-support.patch
Last active August 14, 2020 14:15
patch -p1 in $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/compiler_builtins-0.1.32
diff --git c/src/int/mod.rs w/src/int/mod.rs
index 8a469d9..128fdfd 100644
--- c/src/int/mod.rs
+++ w/src/int/mod.rs
@@ -188,6 +188,7 @@ macro_rules! int_impl {
};
}
+int_impl!(i16, u16, 16);
int_impl!(i32, u32, 32);
#!/usr/bin/env bash
# shellcheck disable=SC2039
HOST=$1
PORT=$2
NAME=$3
NICK="imabot"
USER="$NICK :$NICK"
#!/usr/bin/env bash
# shellcheck disable=SC2039
# PARSE an irc message into a $PREFIX and array of $PARAMS and a $TAIL
# the $TAIL is also the last element of the $PARAMS array
parse_irc_msg() {
__MSG=$1
clean_irc_msg
for (( __i=0; __i<${#__MSG}; __i++ )); do

fedora-audio-setup

Setting up jack, Cadence and a pulseaudio bridge on fedora

# Install Cadence and jack plus deps
sudo dnf install Cadence laditools jack-audio-connection-kit jack-audio-connection-kit-dbus pulseaudio-module-jack
# Install ladish from an old fedora 30 rpm file
sudo dnf install https://rpmfind.net/linux/fedora/linux/releases/30/Everything/x86_64/os/Packages/l/ladish-2-20.3.gitfcb16ae.fc28.x86_64.rpm

Keybase proof

I hereby claim:

  • I am maxaudron on github.
  • I am audron (https://keybase.io/audron) on keybase.
  • I have a public key whose fingerprint is 1EF0 69AB D572 359E B70E 6260 ED5D 5FB3 7EA7 7458

To claim this, I am signing this object:

2019/03/15 08:29:02 [INFO] Terraform version: 0.11.13
2019/03/15 08:29:02 [INFO] Go runtime version: go1.11.5
2019/03/15 08:29:02 [INFO] CLI args: []string{"/usr/bin/terraform", "plan", "-var-file=/home/mmnanz/.terraform.d/vsphere_auth.tfvars"}
2019/03/15 08:29:02 [DEBUG] Attempting to open CLI config file: /home/mmnanz/.terraformrc
2019/03/15 08:29:02 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/03/15 08:29:02 [INFO] CLI command args: []string{"plan", "-var-file=/home/mmnanz/.terraform.d/vsphere_auth.tfvars"}
2019/03/15 08:29:02 [INFO] command: empty terraform config, returning nil
2019/03/15 08:29:02 [DEBUG] command: no data state file found for backend config
2019/03/15 08:29:02 [DEBUG] New state was assigned lineage "12b98bc5-130f-25aa-ae76-cdab87b0f3b7"
2019/03/15 08:29:02 [INFO] command: backend initialized: <nil>
#!/bin/bash
# ----------------------------------------
# Checks if procceses are running and
# outputs neatly formated overview
#
# Usage: pcheck $1 $2 $3
# ----------------------------------------
for program in $@
do