Skip to content

Instantly share code, notes, and snippets.

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

James Treworgy jamietre

👨‍💻
hacking
View GitHub Profile
/**
* 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 / 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 / .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 / 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 / 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: