Skip to content

Instantly share code, notes, and snippets.

View mrwormhole's full-sized avatar
🦇
wisdom is the offspring of suffering and time

Talha Altınel mrwormhole

🦇
wisdom is the offspring of suffering and time
View GitHub Profile
@mrwormhole
mrwormhole / ext4-on-hetzner.yaml
Created October 5, 2023 00:00
EXT4 disk partitioning on Hetzner, please adjust the percentages carefully, this config leaves 60% as unformatted second partition, this is useful for rook-ceph
#cloud-config
# Ubuntu 22.04+
resize_rootfs: false
write_files:
- content: |
path: /etc/growroot-disabled
runcmd:
- [ sgdisk, -e, /dev/sda ]
- [ partprobe ]
- [ parted, -s, /dev/sda, mkpart, primary, ext4, "40%", "100%" ]
@mrwormhole
mrwormhole / xfs-on-hetzner.yaml
Last active January 27, 2024 06:31
XFS disk partitioning on Hetzner, please adjust the percentages carefully so that root partition can have at least 5GB, or it won't do partitioning from this script. 25%~30% is ideal for 40GB SSD, 10% won't work for 40GB SSD
#cloud-config
# Ubuntu 22.04+
resize_rootfs: false
write_files:
- content: |
path: /etc/growroot-disabled
runcmd:
- [ sgdisk, -e, /dev/sda ]
- [ partprobe ]
@mrwormhole
mrwormhole / doc_gen.sh
Created November 24, 2021 23:23
Godoc static HTML generator
#!/usr/bin/env bash
function extract_module_name {
# Extract module name
sed -n -E 's/^\s*module\s+([[:graph:]]+)\s*$/\1/p'
}
function normalize_url {
# Normalize provided URL. Removing double slashes
echo "$1" | sed -E 's,([^:]/)/+,\1,g'
@mrwormhole
mrwormhole / usage.sh
Created May 8, 2021 22:39
Top 10 memory usage in descending order
ps aux | head -1; ps aux | sort -rnk 4 | head -10
@mrwormhole
mrwormhole / VScode-Extensions.txt
Last active April 25, 2024 13:27
VScode extensions I use everyday
Better Comments
Caddyfile Support
CSS Peek
Git Graph
Go
IntelliSense for CSS classnames in HTML
JSON to Go
One Dark Pro
PostgeSQL
SQLite Viewer