Skip to content

Instantly share code, notes, and snippets.

View twhite96's full-sized avatar
🫥
Gone ✌️

tiff twhite96

🫥
Gone ✌️
View GitHub Profile
@twhite96
twhite96 / calibre.py
Created September 14, 2024 00:10
Open calibre python script
import os
path = "/Applications/calibre.app"
flags = os.O_RDONLY
mode = 0o666
os.open(path, flags, mode)
@twhite96
twhite96 / _deobfuscating-unminifying-obfuscated-web-app-code.md
Created August 20, 2024 05:26 — forked from 0xdevalias/_deobfuscating-unminifying-obfuscated-web-app-code.md
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@twhite96
twhite96 / install-qbittorent-web-ui.md
Created August 4, 2024 20:30
How to install qBittorent on Ubuntu Server

To run qBittorent Web Ui Headless, run:

sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable

Then: sudo apt install qbittorrent-nox

Which will give you the web UI at http://localhost:8080

Doing this means you can't run any other commands while running the Web UI.

@twhite96
twhite96 / remove-dates.sh
Created July 11, 2024 11:24
batch remove dates from filenames
function removedates() {
for file in *.md
do mv "${file%%[0-9]*.md} /dates-removed/${file%*.md}"
done
}
@twhite96
twhite96 / convert-to-webp.sh
Created July 11, 2024 11:23
convert all images to webp
function webpall() {
for file in *;
do cwebp -q 50 "$file" -o "${file%.*}.webp";
done
}
@twhite96
twhite96 / compress-images.sh
Created July 11, 2024 11:22
compress images in a folder
function shrink() {
for file in blog/*;
do magick -sampling-factor 4:2:0 -quality 85 -interlace JPEG -colorspace RGB "$file" "${file%.*}.jpg"
done
}
@twhite96
twhite96 / kobocompare
Created July 10, 2024 17:33 — forked from chrisridd/kobocompare
Compare Kobo store prices
#!/usr/bin/perl -w
# Compare book prices across multiple Kobo stores
#
use strict;
use warnings;
use threads;
use WWW::Mechanize;
# FIXME
my $mech = WWW::Mechanize->new(
@twhite96
twhite96 / ipv6guide.md
Created June 22, 2024 17:50 — forked from timothyham/ipv6guide.md
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@twhite96
twhite96 / proxmox-ceph.md
Created June 13, 2024 22:36 — forked from scyto/proxmox-ceph.md
setting up the ceph cluster

CEPH HA Setup

Note this should only be done once you are sure you have reliable TB mesh network.

this is because proxmox UI seems fragile wrt to changing underlying network after configuration of ceph.

All installation done via command line due to gui not understanding the mesh network

This setup doesn't attempt to seperate the ceph public network and ceph cluster network (not same as proxmox clutser network), The goal is to get an easy working setup.

this gist is part of this series

@twhite96
twhite96 / filesystem.md
Last active June 5, 2024 05:15
Fixing filesystem errors after a power outage

Fixing filesystem errors and reboot of Proxmox after a blackout

Tip

Invest in a UPS. Having one allows you to gracefully power down devices and prevents stuff like this from happening.

The error:

I received this error:

wrong fs type, bad option, bad superblock on /dev/sdc2