This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// 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)) | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
wget -e robots=off -r --no-parent -A 'file-name-prefix.*.pkg.tar.zst' https://host.name/patha/pathb/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
NewerOlder