Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
@WillSams
WillSams / pyenv-install.sh
Last active July 4, 2020 12:04
Getting Pyenv Running Under MSys2 on Windows
#!/bin/bash
@WillSams
WillSams / install-tplink-archer.sh
Created June 10, 2020 07:53
Install tp-link AC1300 High Gain Wireless (T4U version 3) on Debian
@WillSams
WillSams / cloning_big_drive.md
Last active February 15, 2021 16:12
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 https://github.com/ptitSeb/box86.git
cd box86
mkdir build && cd build && cmake .. -DRPI4=1 && make install
Github deleting scripts?
Can't find my original linux-devel-setup.sh. Damn.
@WillSams
WillSams / Makefile
Created April 17, 2020 23:21
Sonic 1 Disassembly Makefile
# This is a makefile for Andy Grind's Sonic 1 disassebly fork (https://github.com/andwn/s1disasm)
# and works with the Linux/Windows toolchain creaed from my script:that works with my toolchain.
# Script for my Linux toolchain -> https://gist.github.com/WillSams/c4cbf6235b467d8b595693969342237e
# Script for my Windows toolchain -> https://gist.github.com/WillSams/f592f9d494b51119945440f7e91079b0
GENDEV=/opt/m68k
AS = $(GENDEV)/bin/m68k-elf-as
LD = $(GENDEV)/bin/m68k-elf-ld
@WillSams
WillSams / nuget.md
Last active April 19, 2020 13:03
.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:

  <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <PackageId>Otter</PackageId>
    <Version>0.9.6-20200417</Version>
    <IncludeAssets>all</IncludeAssets>
  </PropertyGroup>
@WillSams
WillSams / ufw_plex.md
Created March 31, 2020 12:35 — forked from nmaggioni/ufw_plex.md
Plex Media Server UFW rule

/etc/ufw/applications.d/plexmediaserver

[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp

[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
@WillSams
WillSams / minidlna-setup.sh
Last active December 10, 2023 20:41
MiniDLNA Setup
SERIALOFINSTANCE=$((100000000000000 + RANDOM % 999999999999999))
sudo bash -c "apt update && apt install minidlna -y"
sudo bash -c "port=8200
friendly_name=Mintbox-Desktop-MiniDLNA
serial='$SERIALOFINSTANCE'
media_dir=A,/media/wsams/mediadrive2/Music
media_dir=V,/media/wsams/mediadrive2/Videos/Movies
@WillSams
WillSams / branch-delete-for-the-padawan.sh
Last active April 17, 2020 12:26
Deleting a Git Branch
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