Skip to content

Instantly share code, notes, and snippets.


Will Sams WillSams

View GitHub Profile
WillSams /
Last active Jul 4, 2020
Getting Pyenv Running Under MSys2 on Windows
WillSams /
Created Jun 10, 2020
Install tp-link AC1300 High Gain Wireless (T4U version 3) on Debian
WillSams /
Last active Feb 15, 2021
Cloning large hard drives
  1. Use built in gnome-disks app to create the partition image.
  2. Note the size of actual contents. I.e., for the 500GB partition you just cloned, the actual contents might have been only 20 GB. We'll use this number to make sense of the 'truncate' command in step 3.
  3. Force partition size of actual contents:
sudo modprobe loop
sudo losetup -f  # use the loop device returned.  For this example, we'll use /dev/loop1
sudo losetup /dev/loop1 my-mintbox.img
sudo partprobe /dev/loop1  
sudo gparted /dev/loop1    # while in gparted, unmount /dev/loop1 and re-size by moving slider all the way to size of actual contents.  Apply!
sudo losetup -d /dev/loop1
sudo apt install git cmake
git clone
cd box86
mkdir build && cd build && cmake .. -DRPI4=1 && make install
Github deleting scripts?
Can't find my original Damn.
WillSams / Makefile
Created Apr 17, 2020
Sonic 1 Disassembly Makefile
View Makefile
# This is a makefile for Andy Grind's Sonic 1 disassebly fork (
# and works with the Linux/Windows toolchain creaed from my script:that works with my toolchain.
# Script for my Linux toolchain ->
# Script for my Windows toolchain ->
AS = $(GENDEV)/bin/m68k-elf-as
LD = $(GENDEV)/bin/m68k-elf-ld
WillSams /
Last active Apr 19, 2020
.NET Core Create & Use Local .Nuget Package (/w content)

Hard to find good information on the Interwebs about this. See below on how to do this correctly:

WillSams /
Created Mar 31, 2020 — forked from nmaggioni/
Plex Media Server UFW rule


title=Plex Media Server (Standard)
description=The Plex Media Server

title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
SERIALOFINSTANCE=$((100000000000000 + RANDOM % 999999999999999))
kill -9 `ps aux | grep 'minidlna' | awk '{print $2}'` #kill if running
sudo bash -c "apt install minidlna"
sudo bash -c "echo '# * \"A\" for audio (eg. media_dir=A,/var/lib/minidlna/music)
# * "P" for pictures (eg. media_dir=P,/var/lib/minidlna/pictures)
# * "V" for video (eg. media_dir=V,/var/lib/minidlna/videos)
# * "PV" for pictures and video (eg. media_dir=PV,/var/lib/minidlna/digital_camera)
git push origin --delete myfeature # delete remote branch
git branch -d myfeature # delete local branch
#git branch -dr origin/myfeature # delete local remote tracking branch
git fetch origin -p # delete (prune from tree) multiple obsolete tracking branches