Skip to content

Instantly share code, notes, and snippets.

View symm's full-sized avatar
🦆

Gareth Jones symm

🦆
View GitHub Profile
#!/bin/bash
if [ ! -f /root/slic_table ]; then
cat /sys/firmware/acpi/tables/SLIC > /root/slic_table
echo "Wrote SLIC to /root/slic_table"
fi
UUID=$(dmidecode | grep -A8 'System Information' | grep -i UUID | awk '{print $2}')
SERIAL=$(dmidecode | grep -A8 'System Information' | grep -i 'serial number' | awk '{print$3}')
PRODUCT=$(dmidecode | grep -A8 'System Information' | grep -i "Product Name" | sed "s/^.*Product Name: //")
@symm
symm / proxmox-mikrotik-template.sh
Last active March 28, 2026 05:08
Installing Mikrotik RouterOS on Proxmox VE easily
#!/bin/bash
# Adapted from https://www.apalrd.net/posts/2023/tip_routeros/
set -e
# Find latest CHR version at https://mikrotik.com/download
CHR_VERSION="7.19.2"
VM_ID=905
STORAGE=local-zfs
#STORAGE=local-lvm
for x in ./*.chd; do
mkdir "${x%.*}"
mv "$x" "${x%.*}"
done
@symm
symm / nfc.ini
Last active September 5, 2023 12:11
dmesg log:
[ 273.098663] usb 1-1.2: new full-speed USB device number 6 using dwc2
[ 273.187435] usb 1-1.2: New USB device found, idVendor=1a86, idProduct=5523, bcdDevice= 3.04
[ 273.187472] usb 1-1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 273.190084] ch341 1-1.2:1.0: ch341-uart converter detected
[ 273.192037] usb 1-1.2: ch341-uart converter now attached to ttyUSB0
[AVision]
preset_default=Core Specific/Adventure Vision
[AtariLynx]
preset_default=Core Specific/Lynx
[GBA]
preset_default=Core Specific/Game Boy Advance
[GameGear]
from fractions import gcd
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA
def egcd(a, b):
if a == 0:
return (b, 0, 1)
@symm
symm / nessus-dl.sh
Last active February 14, 2021 13:06
MD5 (NessusAgent-6.10.2-es7.x86_64.rpm) = 0a42d5838aac2e468663463e1133a6e3
9cd362cd591eda8626ef96bdf9ece2220ee8a5c4 NessusAgent-6.10.2-es7.x86_64.rpm
diff --git a/utils/nfc-mfclassic.c b/utils/nfc-mfclassic.c
index 1242886..8d9c6f0 100644
--- a/utils/nfc-mfclassic.c
+++ b/utils/nfc-mfclassic.c
@@ -431,8 +431,8 @@ write_card(int write_block_zero)
}
} else {
// The first block 0x00 is read only, skip this
- if (uiBlock == 0 && ! write_block_zero && ! magic2)
- continue;
defaults write org.videolan.vlc NSRecentDocumentsLimit 0
defaults delete org.videolan.vlc.LSSharedFileList RecentDocuments
defaults write org.videolan.vlc.LSSharedFileList RecentDocuments -dict-add MaxAmount 0
defaults write com.apple.QuickTimePlayerX NSRecentDocumentsLimit 0
defaults delete com.apple.QuickTimePlayerX.LSSharedFileList RecentDocuments
defaults write com.apple.QuickTimePlayerX.LSSharedFileList RecentDocuments -dict-add MaxAmount 0
GIT_COMMITTER_DATE="`date`" git commit --amend --date "`date`"