Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Happy

Will Sams WillSams

💭
Happy
View GitHub Profile
@WillSams
WillSams / pyenv-install.sh
Last active Jul 4, 2020
Getting Pyenv Running Under MSys2 on Windows
@WillSams
WillSams / install-tplink-archer.sh
Created Jun 10, 2020
Install tp-link AC1300 High Gain Wireless (T4U version 3) on Debian
View install-tplink-archer.sh
@WillSams
WillSams / cloning_big_drive.md
Last active May 29, 2020
Cloning large hard drives
View cloning_big_drive.md
  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/loop0
View box86-install.sh
sudo apt install git cmake
git clone https://github.com/ptitSeb/box86.git
cd box86
mkdir build && cd build && cmake .. -DRPI4=1 && make install
View linux-devel-setup.sh
Github deleting scripts?
Can't find my original linux-devel-setup.sh. Damn.
@WillSams
WillSams / Makefile
Created Apr 17, 2020
Sonic 1 Disassembly Makefile
View 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 Apr 19, 2020
.NET Core Create & Use Local .Nuget Package (/w content)
View nuget.md

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 Mar 31, 2020 — forked from nmaggioni/ufw_plex.md
Plex Media Server UFW rule
View ufw_plex.md

/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)
View minidlna-setup.sh
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)
View branch-delete-for-the-padawan.sh
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
You can’t perform that action at this time.