Skip to content

Instantly share code, notes, and snippets.

View hongymagic's full-sized avatar
🤪

David Hong hongymagic

🤪
View GitHub Profile
version: "3.4"
services:
neko:
image: "m1k1o/neko:google-chrome"
restart: "unless-stopped"
shm_size: "2gb"
ports:
- "80:8080"
- "52000-52100:52000-52100/udp"
cap_add:
@hongymagic
hongymagic / Setup-WSL-Port-Forwarding.ps1
Created June 17, 2022 04:49
Windows 11 Forward ports to WSL 2 instance
<#
.Description
Setup-WSL-Port-Forwarding function forwards commonly used ports from host to WSL.
The forwarded ports include standard HTTP, HTTPS, Postgres, Redis and other development ports.
Run:
Setup-WSL-Port-Forwarding.ps1
#>
$PortsToForward = @(80, 443, 1025, 3000, 3001, 4444, 5000, 5900, 8025, 8080, 8081, 8888, 8900, 9090, 9091, 9190, 9191, 5432, 6379)
@hongymagic
hongymagic / README.md
Last active May 20, 2022 01:25
Setup port forwarding from host to WSL 2

How to use it

  1. Download the above script
  2. Place it somewhere in your drive
  3. The run it
Setup-WSL-Port-Forwarding.ps1
sudo codesign --remove-signature "/Applications/Microsoft Teams.app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper.app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (GPU).app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (Plugin).app"
sudo codesign --remove-signature "/Applications/Microsoft Teams.app/Contents/Frameworks/Microsoft Teams Helper (Renderer).app"
@hongymagic
hongymagic / remap.ahk
Created February 17, 2019 22:32
Windows 10 key remap
; Natural scrolling of the mouse wheels
WheelUp::WheelDown
WheelDown::WheelUp
; Remap Caps Lock to something more useful
CapsLock::Escape
@hongymagic
hongymagic / kubeui.sh
Last active August 1, 2017 00:59
Starting Kubernetes UI for current gcloud setup
kubeui () {
PROJECT=${1:-$(gcloud config list --format 'value(core.project)' 2>/dev/null)}
CLUSTER=${2:-$(gcloud config list --format 'value(container.cluster)' 2>/dev/null)}
ZONE=${3:-$(gcloud config list --format 'value(compute.zone)' 2>/dev/null)}
echo "==> Starting Kubernetes UI for cluster $PROJECT/$CLUSTER in $ZONE..."
gcloud container clusters get-credentials $CLUSTER --project $PROJECT --zone $ZONE && kubectl proxy --port=0
}
@hongymagic
hongymagic / settings.json
Created June 6, 2017 06:12
VSCode workspace settings
{
"editor.cursorBlinking": "solid",
"editor.cursorStyle": "block",
"editor.folding": false,
"editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 18,
"editor.lineHeight": 54,
"editor.lineNumbers": "relative",
"editor.renderIndentGuides": true,
@hongymagic
hongymagic / README.md
Last active May 24, 2017 10:47
K2 Branding

This gist holds image assets for K2.

Keybase proof

I hereby claim:

  • I am hongymagic on github.
  • I am hongymagic (https://keybase.io/hongymagic) on keybase.
  • I have a public key ASBWSCI8ECscypqkQ9r9BVAprZAJg6NDe4XNgJHSzVjlvQo

To claim this, I am signing this object: