Skip to content

Instantly share code, notes, and snippets.

View greyltc's full-sized avatar
💭
I may be slow to respond.

M. Greyson Christoforo greyltc

💭
I may be slow to respond.
View GitHub Profile
@greyltc
greyltc / install-alarm-keyring.sh
Last active May 24, 2025 17:21
install ALARM keyring
#!/usr/bin/env bash
# bash <(curl -sL https://gist.githubusercontent.com/greyltc/449f50d862913238a857b8855129701e/raw/b70b0af31518f894b120ca79be56b6b2af1556dc/install-alarm-keyring.sh)
bash <(curl -sL https://raw.githubusercontent.com/greyltc/build-arch-packages-action/7a7acb293a10165a479ed812f8e5be4bc12ff630/makepkg-url.sh) \
"https://raw.githubusercontent.com/archlinuxarm/PKGBUILDs/refs/heads/master/core/archlinuxarm-keyring/{PKGBUILD,archlinuxarm-keyring.install,archlinuxarm-revoked,archlinuxarm-trusted,archlinuxarm.gpg}" \
--install --force
@greyltc
greyltc / hc_bench.log
Created December 25, 2024 22:06
Intel Arc B580 hashcat benchmark
$ hashcat --benchmark --optimized-kernel-enable --force
hashcat (v6.2.6-851-g6716447df+) starting in benchmark mode
Benchmarking uses hand-optimized kernel code by default.
You can use it in your cracking session by setting the -O option.
Note: Using optimized kernel code limits the maximum supported password length.
To disable the optimized kernel code in benchmark mode, use the -w option.
You have enabled --force to bypass dangerous warnings and errors!
This can hide serious problems and should only be done when debugging.
/// function 1: fine
pub async fn spawn(self, addr: SocketAddr) -> Result<impl Server, Box<dyn std::error::Error>> {
let storage = Disk::new(self.path).map_err(Error::from).await?;
let storage = Verify::new(storage);
log::info!("Local disk storage initialized.");
Ok(spawn_server(storage, &addr))
}
@greyltc
greyltc / nspawn_fail_log3.txt
Created February 6, 2024 12:47
nspawn fail log 3
$ sudo systemd-nspawn --link-journal=host --boot --image /dev/sda init --log-level=debug
Spawning container sda on /dev/sda.
Press Ctrl-] three times within 1s to kill container.
systemd 255.3-1-arch running in system mode (+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
Detected virtualization systemd-nspawn.
No confidential virtualization detection on this architecture
Detected architecture arm64.
Detected initialized system, this is not the first boot.
Kernel version 6.7.3-arch1-2, our baseline is 4.15
No credentials passed from initrd.
@greyltc
greyltc / nspawn_logv2.txt
Last active February 6, 2024 06:47
systemd-nspawn for arm64
$ sudo systemd-nspawn --link-journal=host --capability=CAP_SYS_ADMIN --boot --image /dev/sda init --log-level=debug
Spawning container sda on /dev/sda.
Press Ctrl-] three times within 1s to kill container.
systemd 255.3-1-arch running in system mode (+PAM +AUDIT -SELINUX -APPARMOR -IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +XKBCOMMON +UTMP -SYSVINIT default-hierarchy=unified)
Detected virtualization systemd-nspawn.
No confidential virtualization detection on this architecture
Detected architecture arm64.
Detected initialized system, this is not the first boot.
Kernel version 6.7.3-arch1-2, our baseline is 4.15
No credentials passed from initrd.
@greyltc
greyltc / rpicam_build_from_git.sh
Last active January 31, 2024 11:22
rebuilds all the rpi5 camera stuff from git
#!/usr/bin/env bash
# curl https://gist.githubusercontent.com/greyltc/13111f281aeb094337e6aac22baf0e6a/raw | bash
set -o pipefail
set -o errexit
set -o nounset
# tested working on vanilla Raspberry Pi OS (bookworm, 64bit) on my rpi5 on 29 jan 2024
# camera software usage docs: https://www.raspberrypi.com/documentation/computers/camera_software.html
sudo sed 's,^#deb-src http://archive.raspberrypi.com,deb-src http://archive.raspberrypi.com,' -i /etc/apt/sources.list.d/raspi.list
@greyltc
greyltc / mkarchroot_by_date.sh
Last active November 14, 2023 17:49
mkarchroot as if it was run on a given date (by using the Arch Linux Archive)
#!/usr/bin/env bash
#bash <(curl -sL https://gist.github.com/greyltc/d17802b7ed5ba0c56146b17497c9cb8e/raw) 2020-01-01 base-devel vim
TRAVEL_TO="${1}" # 2020-01-01, for example
PACKAGES="${@:2}"
TIMETRAVEL_ROOT="timetravel_${TRAVEL_TO}"
#sudo rm -rf "${TIMETRAVEL_ROOT}"
@greyltc
greyltc / makepkg-url.sh
Last active May 20, 2025 21:07
builds an Arch package from files given in a (curl glob formatted) URL
#!/usr/bin/env bash
# builds an Arch package from files given in a (curl glob formatted) URL
# example usage; (re)build and install the aurutils package:
# bash <(curl -sL https://gist.github.com/greyltc/8a93d417a052e00372984ff8ec224703/raw) "https://aur.archlinux.org/cgit/aur.git/plain/{PKGBUILD,aurutils.changelog,aurutils.install}?h=aurutils" -if
set -e
TMPDIR=$(mktemp -p /var/tmp --directory)
touch "${TMPDIR}/.deleteme"
@greyltc
greyltc / wget-glob-fetch.sh
Created February 11, 2022 11:49
wget globbing
#!/bin/sh
wget -e robots=off -r --no-parent -A 'file-name-prefix.*.pkg.tar.zst' https://host.name/patha/pathb/
@greyltc
greyltc / analytical_sln_to_solar_cell_eqn.py
Last active November 22, 2021 17:54
analytical solution for non-ideal solar cell equation
#!/usr/bin/env python3
"""
written by Grey Christoforo <first name [at] last name [not] net>
analytical solution for non-ideal solar cell equation
"""
import sympy
# make symbols