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 / 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:
@jamietre
jamietre / import.ps
Created April 20, 2021 11:46
Import local issuer certificates to msys2
get-childitem -path cert:\LocalMachine\Root | ForEach-Object {
$hash = $_.GetCertHashString()
$base64certificate = @"
-----BEGIN CERTIFICATE-----
$([Convert]::ToBase64String($_.export('Cert'), [System.Base64FormattingOptions]::InsertLineBreaks))
-----END CERTIFICATE-----
"@
[System.IO.File]::AppendAllText("$home\windows.pem", $base64certificate)
}
@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
/**
* A reporter that suppresses logs for passing tests
*
* There's no direct way to do this at this point other than a custom reporter. Future
* changes may give us an option to do this without a custom reporter:
*
* https://github.com/facebook/jest/issues/4156
*
* ts-jest seems to not have registered TypeScript extension at the point the reporters are
* registered; this must be JavaScript unless we want to precompile it.
@jamietre
jamietre / gist:e031894cd689342d8ee47be132b77528
Last active December 27, 2017 15:44
zsh config for windows-like inline text editing in iterm2 console in MacOS X
# add to .zshrc
r-delregion() {
if ((REGION_ACTIVE)) then
zle kill-region
else
zle $1
fi
}
@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 / README.md
Last active July 23, 2017 12:42
List of "right eye first" blu ray movies
  • Bait
  • The Chronicles of Narnia: The Voyage of the Dawn Trader
  • The Darkest Hour
  • Dolphin Tale
  • Drive Angry
  • Edge of Tomorrow
  • Ghostbusters (2016)
  • Gulliver's Travels
  • The Hobbit: An Unexpected Journey
  • The Hobbit: The Desolation of Smaug
@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 / Microsoft.Typescript.targets
Created April 29, 2016 18:14
Better msbuild config for Typescript projects in Visual Studio that tries to use npm modules first
<?xml version="1.0" encoding="utf-8"?>
<!--
***********************************************************************************************
Microsoft.TypeScript.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your web deploy projects from the command-line or the IDE.
This file defines the steps in the standard build process for TypeScript files.