Skip to content

Instantly share code, notes, and snippets.

@dantheman213
dantheman213 / setup-game-proxy-server.sh
Last active January 30, 2024 06:48
Create game proxy server to forward traffic to your home network through VPN
#!/usr/bin/env bash
# Create game proxy server to forward traffic to your home network through VPN.
# Great for a cheap Linode, Digital Ocean, etc $5/mo server for modest traffic.
# Keep your home network and IP safe by setting up an isolated VPN to connect your public external proxy to your protected home network
# Keep costs down by using a server you already have at home instead of paying large sums every month just to host some games with your friends.
# Example diagram
# User / Game Client -> Internet -> Your cheap VPS proxy server -> OpenVPN -> Your home network -> Your home server
@dantheman213
dantheman213 / macos-terminal-config-for-linux-windows.md
Last active March 4, 2023 20:11
MacOS Terminal Settings for Linux or Windows Terminal
@dantheman213
dantheman213 / Tomb Raider 1.cfg
Created September 29, 2022 02:02
Tomb Raider (1996) PC JoyToKey Xbox One controller config
[General]
FileVersion=69
NumberOfJoysticks=2
NumberOfButtons=32
DisplayMode=2
UseDiagonalInput=0
UseDiagonalInput2=0
UsePOV8Way=0
RepeatSameKeyInSequence=0
Threshold=20
@dantheman213
dantheman213 / word-scramble.pl
Created September 28, 2022 20:40
word scramble solver
#!/usr/bin/perl
use strict;
use warnings;
#
# Complete the 'SearchForWord' function below.
#
# The function is expected to return an INTEGER_ARRAY.
# The function accepts following parameters:
@dantheman213
dantheman213 / timeDiff.go
Created August 3, 2022 20:26
Golang get time diff from a, b, formatted pretty
// e.g. returns 00:00:25
func getTimeDiff(a, b time.Time) string {
d := b.Sub(a)
hour := int(d.Seconds() / 3600)
minute := int(d.Seconds() / 60) % 60
second := int(d.Seconds()) % 60
return fmt.Sprintf("%02d:%02d:%02d", hour, minute, second)
}
#!/usr/bin/env bash
# ex: ./charles_convert_raw_hexdump_to_bin.sh hexdumpraw.txt hexformatted.txt data.bin
# hexdumpraw.txt ex:
## 00000510 0a 6d 6f 64 65 6c 5f 6e 61 6d 65 12 07 4e 65 78 model_name Nex
## 00000520 75 73 20 35 1a 20 0a 11 61 72 63 68 69 74 65 63 us 5 architec
## 00000530 74 75 72 65 5f 6e 61 6d 65 12 0b 61 72 6d 65 61 ture_name armea
## 00000540 62 69 2d 76 37 61 1a 19 0a 0b 64 65 76 69 63 65 bi-v7a device
## 00000550 5f 6e 61 6d 65 12 0a 68 61 6d 6d 65 72 68 65 61 _name hammerhea
@dantheman213
dantheman213 / Xbox Controller (Gamepad).txt
Last active February 19, 2023 03:24
Wii U CEMU Xbox Controller Profiles
# Wii U / Cemu Xbox controller profile
# Located at: cemu\controllerProfiles
[General]
emulate = Wii U GamePad
api = XInput
controller = 0
[Controller]
rumble = 0
@dantheman213
dantheman213 / Xbox Controller (GCPad).ini
Last active February 11, 2024 21:07
Dolphin Gamecube/Wii emulator / Xbox One Controller profile
# Dolphin Gamecube/Wii emulator / Xbox One Controller profile
# Gamecube Controller
# Location -> C:\User\<your user>\Documents\Dolphin Emulator\Config\Profiles\GCPad\Xbox Controller (GCPad).ini
[Profile]
Device = XInput/0/Gamepad
Buttons/A = `Button A`
Buttons/B = `Button B`
Buttons/X = `Button X`
Buttons/Y = `Button Y`
@dantheman213
dantheman213 / elementary_os_install_nvidia.sh
Created June 19, 2021 17:21
Elementary OS Install NVIDIA Graphics Card
# Elementary OS install nvidia graphics drivers
## remove old drivers
sudo apt autoremove nvidia*
## install new drivers
sudo ubuntu-drivers autoinstall