Skip to content

Instantly share code, notes, and snippets.

View thomasheller's full-sized avatar

Thomas Heller thomasheller

View GitHub Profile
@thomasheller
thomasheller / fix.sh
Last active February 7, 2024 08:15
Arch Linux - vmlinuz-linux not found
# If your machine crashes during an OS kernel update, you may not be able to boot anymore.
# You can boot from a USB drive (Arch install ISO) and run the following commands to fix it:
lsblk # Replace "/dev/sda" in the following commands with your actual hard disk device
cryptsetup luksOpen /dev/sda2 linux
mount /dev/mapper/Linux-root /mnt
mount /dev/mapper/Linux-home /mnt/home
mount /dev/sda1 /mnt/boot
swapon /dev/mapper/Linux-swap
arch-chroot /mnt
#!/bin/bash
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
@thomasheller
thomasheller / drop_all_tables.sh
Created May 20, 2020 13:01
Drop all tables in MySQL database
echo 'SET FOREIGN_KEY_CHECKS = 0;' > tmp.sql
mysqldump --add-drop-table --no-data <user, password, db> | grep 'DROP TABLE' >> tmp.sql
echo 'SET FOREIGN_KEY_CHECKS = 1;' >> tmp.sql
mysql <user, password, db> < tmp.sql
rm tmp.sql
@thomasheller
thomasheller / Docker_ufw.md
Last active April 1, 2020 19:14
Docker ufw

Fix ufw not blocking Docker forwarding ports:

echo '{"iptables": false}' >/etc/docker/daemon.json
@thomasheller
thomasheller / INSTALL_Arch_cryptsetup.md
Last active June 22, 2021 08:49
Arch Linux "LVM on LUKS" setup

Arch Linux "LVM on LUKS" setup

  • Download ISO and verify signatures.

  • Boot and select "Boot Arch Linux (x86_64)".

  • If you're on a WiFi-only network, connect via iwctl:

iwctl
@thomasheller
thomasheller / INSTALL.md
Last active March 26, 2024 14:01
Install Arch Linux in VirtualBox VM