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
  • Hill country
View GitHub Profile
@skull-squadron
skull-squadron / gcc11-clang17.diff
Last active September 4, 2025 08:40
gcc11-clang17 fix
diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
index e80ecd8f4b35..e58fa55c0f58 100644
--- a/libcc1/libcc1plugin.cc
+++ b/libcc1/libcc1plugin.cc
@@ -31,6 +31,8 @@
#undef PACKAGE_TARNAME
#undef PACKAGE_VERSION
+#define INCLUDE_MEMORY
@skull-squadron
skull-squadron / hash-checker
Created September 1, 2025 05:22
hash-checker - Generic recursive SHA256 creation and checking utility
#!/bin/sh
# shellcheck disable=2094
set -eu
cd "$(dirname "$0")" || exit 1
hash_file='hashes.txt'
case "${1-}" in
save) find . -type f -print0 ! -name "$hash_file" | sort -z | xargs -0 sha256sum | tee "$hash_file" ;;
@skull-squadron
skull-squadron / command-not-found.sh
Created August 31, 2025 05:14
FreeBSD bash command not found handler
# /etc/profile.d/command-not-found.sh
[ "$BASH" ] || return 0
command_not_found_handle() {
if [[ "$1" = */* ]]; then
local cmd="${1#/}$"
else
local cmd="usr/local/s?bin/$1$"
fi
@skull-squadron
skull-squadron / README.md
Last active August 30, 2025 11:26
Permanent, hassle-free VMware Workstation 17 Autostart fix

VMware Workstation autostart that works

The problem is that VMware Workstation Autostart service doesn't work.

1. Reset the Autostart service back to default so it doesn't run

Start-Process powershell -Verb RunAs "Set-Service -Name VmwareAutostartService -StartupType Manual"
@skull-squadron
skull-squadron / .gitignore
Last active August 28, 2025 21:52
C++ O(1) epoch <-> datetime (requires floating point math)
/testcxx
/testc
@skull-squadron
skull-squadron / generate-passwd
Last active August 12, 2025 11:00
Generate a random password of length N meeting complexity requirements in pure Bash 4+
#!/usr/bin/env bash
set -Eeuo pipefail
die() {
echo >&2 "$@"
echo >&2
echo >&2 "Usage: $(basename "$0") {{length>=1}} {{char_range[:min] ...}}"
echo >&2
echo >&2
exit 1
@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