This file contains 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
pacman -S audit | |
sudo systemctl enable --now auditd | |
# track folder | |
sudo auditctl -w /tmp/custom_folder_to_watch -p r -k custom_test_watch_key | |
# view access logs | |
sudo ausearch -k custom_test_watch_key | |
# list watchers |
This file contains 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
pacman -S brlaser | |
pacman -S brscan5 | |
pacman -S sane |
This file contains 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
yay -S gromit-mpx |
This file contains 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 extractAndSortPosts() { | |
// Get all posts | |
const rows = document.querySelectorAll(".athing.submission"); | |
const posts = []; | |
rows.forEach(row => { | |
// Extract title | |
const titleElement = row.querySelector(".titleline a"); | |
const title = titleElement ? titleElement.innerText : "No title"; |
This file contains 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 pacman -Syu | |
sudo pacman -S gdm | |
sudo systemctl enable gdm.service | |
# disable lightdm if installed | |
sudo systemctl disable lightdm.service | |
# (optional) remove lightdm | |
sudo pacman -Rns lightdm lightdm-gtk-greeter |
This file contains 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
# edit autostart file | |
vim ~/.config/autostart/dropbox.desktop | |
# Add or modify | |
X-GNOME-Autostart-enabled=false | |
# completely remove autostart | |
# rm ~/.config/autostart/dropbox.desktop | |
# disable service |
This file contains 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
ethereum_generate_keys() { | |
# Generate the private key and public key | |
local key=$(openssl ecparam -name secp256k1 -genkey -noout | openssl ec -text -noout 2>/dev/null) | |
# Extract and clean the public key | |
local pub=$(echo "$key" | grep pub -A 5 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^04//') | |
# Extract and clean the private key | |
local priv=$(echo "$key" | grep priv -A 3 | tail -n +2 | tr -d '\n[:space:]:' | sed 's/^00//' | sed 's/^priv//') |
This file contains 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
ethereum_hex_private_key_to_pem() { | |
local private_key_hex="$1" | |
# Wrap the private key in ASN.1 structure and pass directly to openssl | |
echo "302e0201010420$private_key_hex a00706052b8104000a" | \ | |
xxd -r -p | openssl ec -inform DER -outform PEM 2>/dev/null | |
} | |
ethereum_generate_address_from_private_key() { | |
private_key_hex="$1" |
This file contains 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
# boot from live disk | |
# mount user partition | |
mount /dev/sda3 /mnt | |
# it might under a different location, such as | |
# mount /dev/nvme0n1p3 /mnt | |
# chroot into partition | |
arch-chroot /mnt |
This file contains 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
i3-gaps | |
neofetch | |
gotop | |
cava | |
tty-clock | |
nvtop |
NewerOlder