Skip to content

Instantly share code, notes, and snippets.

View jdkang's full-sized avatar

Jaigene Kang jdkang

View GitHub Profile
@jdkang
jdkang / poe2_keybinds.ahk
Last active June 10, 2025 00:15
Path of Exile 2 AHK v2 Keybinds
#Requires AutoHotkey v2.0+
#SingleInstance Force
#HotIf WinActive("ahk_class POEWindowClass")
SendLevel 0
CoordMode("Mouse", "Screen")
; ------------------------------------------------------
; Path of Exile 2 AutoHotKey v2 Keybinds
; ------------------------------------------------------
; - Chat commands such as /hideout and /leave
@jdkang
jdkang / setup.md
Last active April 1, 2025 13:32
Home Assistant 2025 Setup Notes

Overview

This guide manually sets up Home Assistant to use Tailscale (in lieu of DUckDNS/etc and port forwarding).

The classic DuckDNS + Let's Encrypt route is fine but require exposing a port on y our home router.

If you're commited to exposing HA to the internet (e.g. to expose other services publicly) I'd probably go the Cloudlflare Reverse-TUnnel route (albeit not free since you have to register a domain)

We harden Tailscale a bit by using the Lock feature to stop theoretical node injections into the network. 2FA has to be setup on your IdP provider (e.g. google, github, etc)

One should also have Home Assistant and IOT devices on their own VLAN, but that's outside the scope of this doc.

@jdkang
jdkang / pushover.ps1
Last active October 6, 2024 18:14
Wiim Spotify Start Playlist
#Requires -Version 7.0
Import-Module joshooaj.PSPushover -ea 0
$poverUserKey = 'xxxxxxxxxxxxxxxxxxxxxx'
$puApiToken = 'xxxxxxxxxxxxxxxxxxxxxxxx'
$secStringArg = @{
AsPlainText = $true
Force = $True
}
Set-PushoverConfig -Token (ConvertTo-SecureString -String $puApiToken @secStringArg) -User (ConvertTo-SecureString -String $poverUserKey @secStringArg)
@jdkang
jdkang / watch_packetloss_iperf.sh
Created March 7, 2023 18:33
Bash Script Run iperf3 if ping packet loss over a threshold
#!/bin/bash
# Script to run iperf3 (with auth) when ping threshold passes threshold
# Routers often deprioritize ICMP traffic or shunt it to less powerful control planes
# This means ICMP isn't a smoking gun per se when it come sto packet loss.
# The rationale of this script is iperf3 simulates 'real traffic' to further validate
#
# - iperf3 reports will be saved in a subdirectory relative to the script ("save_path")
# - you'll need to setup iperf3 as a daemon/service on a VPS/etc
#
@jdkang
jdkang / watch_packet_loss.sh
Last active February 22, 2023 03:25
bash script: watch for packet loss and run MTR
#!/bin/bash
# Script to watch for packet loss and run MTR if a threshold is met
# Must be run w/ sudo or root
target_host="8.8.8.8"
ping_loss_threshhold=0.2
mtr_cycles=1000
mtr_interval=0.5
run_delay_sec=30
@jdkang
jdkang / ping_fails.sh
Last active March 22, 2022 13:42
linux ping surfacing "request time out" (like Windows ping)
#!/bin/bash
# Windows ping by default will show ping failures
# GNU/nix ping is more tolerant (e.g. 2 RTTs) by default
# ---- params ----
ip="${1:-1.1.1.1}"
heartbeat_interval_sec=30
if [[ ! $ip =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]
then
@jdkang
jdkang / powershell_vmmap_parse.ps1
Created January 16, 2022 19:06
powershell vmmap parsing commit total
function New-VmMapLogFile {
#Requires -RunAsAdministrator
[CmdletBinding()]
param(
[Parameter(Mandatory=$True,ValueFromPipelineByPropertyName=$True)]
[Alias('id')]
[int32[]]
$Ids,
[Parameter(Mandatory=$False)]
bash -c "$(wget --no-check-certificate https://gist.githubusercontent.com/jdkang/b74008a1e8aaac608f68c3831d778b10/raw/cc3b54b74ac4e5d8bd54a2f2995c0407e2aae41b/zsh.sh -O -)"
@jdkang
jdkang / update.sh
Created October 29, 2021 00:38
k8s exam setup
#!/bin/bash
cat <<- EOF > ~/.vimrc
color desert
set hlsearch " highlight all search results
set ignorecase " do case insensitive search
set incsearch " show incremental search results as you type
set number " display line number
set noswapfile " disable swapfile
set cursorline