Skip to content

Instantly share code, notes, and snippets.

View jamietre's full-sized avatar
👨‍💻
hacking

James Treworgy jamietre

👨‍💻
hacking
View GitHub Profile
@jamietre
jamietre / .zshrc-wsl-windows-terminal
Last active June 12, 2023 03:20
zsh config for windows-like inline editing using Windows Terminal + wsl
# add this to your .zshrc
r-delregion() {
if ((REGION_ACTIVE)) then
zle kill-region
else
local widget_name=$1
shift
zle $widget_name -- $@
fi
@jamietre
jamietre / ddns_provider.conf
Last active July 10, 2023 03:11
Howto - using duckdns with Synology RT2600AC
[DuckDNS]
modulepath=/sbin/duckddns
queryurl=duckDNS.org
@jamietre
jamietre / transcodemvc.bat
Last active September 16, 2023 01:14
Batch file for transcoding MVC 3D streams in an MKV container
@ECHO OFF
rem usage: transcodemvc input output [-r] [-s]
rem -r will re-use a previously extracted elementary stream from the temp file location
rem -s will swap eyes
set TEMP_DIR=c:\temp\recodemvc
set TEMP_FILE=%TEMP_DIR%\temp_mvc.264
set PROFILE=high
set SWAP=false
@jamietre
jamietre / pc-rules.erb
Last active February 16, 2024 10:51
Karabiner Elements config to map home/end keys to PC-like behavior on MacOS X
{
"title": "MacOS -> PC Shortcuts",
"rules": [
{
"description": "Top/bottom of document (ctrl+home/ctrl+end)",
"manipulators": [
{
"type": "basic",
"from": <%= from("home", ["command"], ["any"]) %>,
"to": <%= to([["up_arrow", ["left_command"]]]) %>,
@jamietre
jamietre / docker-compose.yml
Last active March 17, 2024 23:11
Script to start WSL and bind localhost to WSL IP
# Example docker-compose.yml for plex.
version: "2"
services:
plex:
image: plexinc/pms-docker:plexpass
runtime: nvidia
container_name: "plex"
restart: always
hostname: "MY-PLEX"
volumes: