Skip to content

Instantly share code, notes, and snippets.

View WillSams's full-sized avatar
🚀

Will Sams WillSams

🚀
View GitHub Profile
@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
@WillSams
WillSams / wiiu_retroarch_notes
Created March 11, 2020 13:06
Fix Retroarch Assets/Scan On Wii U
[Note: Not mine, this was copy word for word from here: https://pastebin.com/raw/6NAUDzgJ]
How to Fix Retroarch Assets and Game Scan
====================================================================================================================================
How to Fix Retroarch on your if the online updater and scanner are not working.
[Example designed for Wii u but should be cross platform if your having a problem]
1. Download Retroarch on your platform of choice. (Retroarch rpx version on wii u)
2. Run Retroarch at least once, if your missing assets it will ask you to use the online updater which on Wii u will fail.
@WillSams
WillSams / generate.sh
Last active February 11, 2020 21:04
Simple VS Code C# Solution Generation Example
#!/bin/bash
echo "==============================================================="
echo " This script can be executed under Linux (Debian based) or "
echo " Windows (using MSys2/Git Bash) "
echo " Also, Sqlite3 will be installed if already not availabe. "
echo
echo " To ensure this script works, run this command on this file: "
echo " chmod +x generate.sh "
echo "==============================================================="
@WillSams
WillSams / debug-legacy-dotnet-in-vscode.sh
Last active April 13, 2020 15:36
Debug Legacy .NET in VS Code on Windows
#!/bin/bash
echo "********************************************************************"
echo
echo " Debug Legacy .NET in VS Code on Windows "
echo " Pre-req: Latest 64-bit MSYS2 from http://www.msys2.org/ "
echo
echo " Howto: Use 'wget' to download the raw version of this script "
echo " and execute the following from the MSys2 command-line: "
echo " chmod +x debug-legacy-dotnet-in-vscode.sh "
@WillSams
WillSams / interview_questions.sh
Last active December 20, 2019 13:34
Powershell Coding Interview
# ==============================================================================
# 1 - Powershell program to determine if any two integers in array sum to given integer
# ==============================================================================
echo '$myArray = @{}
class Algorithm {
#Brute force solution, O(n^2) time complexity
[bool] TwoIntegersSumToTarget([int[]] $arr, [int] $target) {
$numElements = $arr.length
for ([int] $outer = 0; $outer -lt $numElements; $outer++) {
@WillSams
WillSams / interview_questions.sh
Last active December 20, 2019 13:58
C# Coding Interview
# ==============================================================================
# 1 - C# program to determine if any two integers in array sum to given integer
# ==============================================================================
dotnet new console -n arrayprograms
echo 'using System;
namespace CodingAlgorithm {
sealed class Algorithm {
//Brute force solution, O(n^2) time complexity
@WillSams
WillSams / es_systems.cfg
Last active February 9, 2023 05:10
Retropie example es_systems.cfg
<?xml version="1.0"?>
<systemList>
<system>
<name>3do</name>
<fullname>3DO</fullname>
<path>/home/pi/RetroPie/roms/3do</path>
<extension>.cue .chd .m3u .iso .CUE .CHD .M3U .ISO</extension>
<command>/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-opera/opera_libretro.so %ROM%</command>
<platform>3do</platform>
<theme>3do</theme>
@WillSams
WillSams / m68k-bin2elf.sh
Created May 12, 2019 21:11
M68000 Bin2Elf
#!/bin/bash
echo "==================================================================="
echo " This script can be executed under Linux or Windows (using MSys2) "
echo " Modify GENDEV variable to fit your toolchain. "
echo
echo " Linux toolchain: "
echo " https://gist.github.com/WillSams/c4cbf6235b467d8b595693969342237e "
echo
echo " Windows toolchain: "