Skip to content

Instantly share code, notes, and snippets.

View charles_convert_raw_hexdump_to_bin.sh
#!/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 Aug 27, 2021
Wii U CEMU Xbox Controller Profiles
View Xbox Controller (Gamepad).txt
# 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 May 30, 2022
Dolphin Gamecube/Wii emulator / Xbox One Controller profile
View Xbox Controller (GCPad).ini
# 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 Jun 19, 2021
Elementary OS Install NVIDIA Graphics Card
View elementary_os_install_nvidia.sh
# Elementary OS install nvidia graphics drivers
## remove old drivers
sudo apt autoremove nvidia*
## install new drivers
sudo ubuntu-drivers autoinstall
@dantheman213
dantheman213 / pdf.md
Created Mar 21, 2021
Convert PDF into high quality images
View pdf.md
@dantheman213
dantheman213 / average-geolocation.js
Created Aug 23, 2020 — forked from tlhunter/average-geolocation.js
Calculate the center/average of multiple GeoLocation coordinates
View average-geolocation.js
/**
* Calculate the center/average of multiple GeoLocation coordinates
* Expects an array of objects with .latitude and .longitude properties
*
* @url http://stackoverflow.com/a/14231286/538646
*/
function averageGeolocation(coords) {
if (coords.length === 1) {
return coords[0];
}
@dantheman213
dantheman213 / exponential_backoff.go
Last active Apr 16, 2022
Golang exponential back off simple example
View exponential_backoff.go
package main
import "fmt"
import "time"
import "math"
var exponentialBackoffCeilingSecs int64 = 14400 // 4 hours
func main() {
fmt.Println("Hello World")
View update_nodejs_npm_linux.sh
Update nodejs to latest version:
sudo npm install -g n
sudo n latest
Update npm to latest version:
sudo npm install -g npm
Do what @runcible suggested
hash -d npm
View sudo-no-password.sh
echo "username ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
@dantheman213
dantheman213 / ffmpeg.md
Last active Feb 23, 2021
ffmpeg cheatsheet
View ffmpeg.md

ffmpeg cheatsheet

Extract video at 30 seconds in and the duration with be 5 seconds

ffmpeg -ss 00:00:30 -i orginalfile -t 00:00:05 -vcodec copy -acodec copy newfile

Add a watermark logo to the bottom right of the video offset by 30 x 30 from corner