Skip to content

Instantly share code, notes, and snippets.

View skull-squadron's full-sized avatar
💭
*aaS unreleased project in Elixir, Rust, Typescript, Kafka, and k8s

🏴‍☠️ skull-squadron

💭
*aaS unreleased project in Elixir, Rust, Typescript, Kafka, and k8s
  • (stealth)
  • ATX
  • 01:18 (UTC -06:00)
View GitHub Profile
@skull-squadron
skull-squadron / apt-install-from-url
Last active August 11, 2025 13:22
Install any number of .deb from arbitrary URL(s)
#!/usr/bin/env bash
set -Eeuo pipefail
command -v curl &>/dev/null || { apt update && DEBIAN_FRONTEND=noninteractive apt install -y curl ;}
debs=() urls=() args=()
trap 'e=$?; trap - EXIT; (( ${#debs} > 0 )) && rm -f "${debs[@]}"; exit $e' EXIT
while (( $# > 0 )); do
case "$1" in
--) shift; break ;;
-*) args+=("$1"); shift ;;
*) urls+=("$1"); shift ;;
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
use Env;
my @dirs = ();
my $help = 0;
@skull-squadron
skull-squadron / install.sh
Created July 31, 2025 06:20
Install Garage from source
#!/usr/bin/env bash
set -xEeuo pipefail
default_features=(
bundled-libs
metrics
lmdb
sqlite
)
other_features=(
@skull-squadron
skull-squadron / .config
Created July 31, 2025 05:56
vanilla Linux 6.15.8 kitchen-sink x86_64 .config
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.15.8 Kernel Configuration
#
# CONFIG_CC_VERSION_TEXT="gcc (Debian 12.2.0-14+deb12u1) 12.2.0"
# CONFIG_CC_IS_GCC=y
# CONFIG_GCC_VERSION=120200
# CONFIG_CLANG_VERSION=0
# CONFIG_AS_IS_GNU=y
# CONFIG_AS_VERSION=24000
# CONFIG_LD_IS_BFD=y
@skull-squadron
skull-squadron / verify
Last active July 30, 2025 06:34
Improved Supermicro™ signature verification tool for Linux, Mac, FreeBSD, etc.
#!/bin/sh
if [ $# != 2 ]; then
echo >&2
echo >&2 "$(basename "$0") <file> <signature_file>"
echo >&2
exit 1
fi
check_signature() {
@skull-squadron
skull-squadron / bash-5.3-xd6.diff
Last active July 20, 2025 03:31
Bash 5.3 XDG patch
diff -ur a/bashhist.c b/bashhist.c
--- a/bashhist.c 2024-05-06 15:38:27.000000000 +0000
+++ b/bashhist.c 2025-07-20 03:02:01.549901005 +0000
@@ -419,7 +419,7 @@
char *
bash_default_histfile (void)
{
- return (bash_tilde_expand (posixly_correct ? "~/.sh_history" : "~/.bash_history", 0));
+ return find_bash_user_file(posixly_correct ? "sh_history" : "bash_history", "XDG_STATE_HOME", "~/.local/state");
}
@skull-squadron
skull-squadron / dpkg-purge-all.sh
Created July 19, 2025 11:13
Purge debian/ubuntu uninstalled packages
#!/usr/bin/env sh
exec dpkg --get-selections | awk '/deinstall$/{sub(":.*","",$1);print$1}' | xargs dpkg -P
@skull-squadron
skull-squadron / fix-go-1.21.13.diff
Last active July 17, 2025 14:07
Fix go-1.21.13 building on amd64/aarch64 on Rosetta 2
--- a/src/crypto/tls/handshake_client_test.go 2025-07-17 13:07:13.898915009 +0000
+++ b/src/crypto/tls/handshake_client_test.go 2025-07-17 12:51:59.420067002 +0000
@@ -1779,6 +1779,7 @@
test.configureClient(clientConfig, &clientCalled)
testHandshakeState := func(name string, didResume bool) {
+ t.Skip("Doesn't work on amd64 on Rosetta 2 or on QEMU")
_, hs, err := testHandshake(t, clientConfig, serverConfig)
if err != nil {
t.Fatalf("%s: handshake failed: %s", name, err)
@skull-squadron
skull-squadron / fix-go1.19.13.diff
Last active July 17, 2025 10:19
Patch to make go 1.19.13 install on amd64 on Rosetta 2
--- a/crypto/tls/handshake_client_test.go 2025-07-17 09:17:22.598688001 +0000
+++ b/crypto/tls/handshake_client_test.go 2025-07-17 09:20:10.546419009 +0000
@@ -1755,6 +1755,7 @@
t.Errorf("%s: expected server VerifyConnection called %d times, did %d times", name, wantCalled, serverCalled)
}
}
+ t.Skip("Doesn't work on amd64 on Rosetta 2 or on QEMU")
testHandshakeState(fmt.Sprintf("%s-FullHandshake", test.name), false)
testHandshakeState(fmt.Sprintf("%s-Resumption", test.name), true)
}
@skull-squadron
skull-squadron / fix-go-1.4-bootstrap.diff
Created July 17, 2025 08:48
Patch to make go 1.4 build and test on amd64 under Rosetta 2
--- a/os/exec/exec_test.go 2025-07-17 08:31:03.824802001 +0000
+++ b/os/exec/exec_test.go 2025-07-17 08:40:30.611330000 +0000
@@ -262,6 +262,7 @@
}
func closeUnexpectedFds(t *testing.T, m string) {
+ t.Skip("Doesn't work on amd64 on Rosetta 2 or on QEMU")
for fd := basefds(); fd <= 101; fd++ {
err := os.NewFile(fd, "").Close()
if err == nil {