Skip to content

Instantly share code, notes, and snippets.

@ibiqlik
Last active January 13, 2022 16:09
Show Gist options
  • Save ibiqlik/a49fd3af03f9b9d6ef60a8aefbb9697e to your computer and use it in GitHub Desktop.
Save ibiqlik/a49fd3af03f9b9d6ef60a8aefbb9697e to your computer and use it in GitHub Desktop.
Oneliners

Docker/K8s

Speedtest

docker run -it --rm --entrypoint sh node -c "npx -y speed-cloudflare-cli"

Install K9s

wget https://github.com/derailed/k9s/releases/download/v0.24.9/k9s_Linux_x86_64.tar.gz && tar xzvf k9s_Linux_x86_64.tar.gz && sudo mv k9s /usr/local/bin/k9s

WSL

Windows VPN issue (CheckPoint)

netsh interface set interface "vEthernet (WSL)" disable
# Connect VPN
netsh interface set interface "vEthernet (WSL)" enable
sudo ifconfig eth0 mtu 1350

"C:\Users\[USER]\.wslconfig"

[wsl2]
memory=16GB
processors=8

Optimize VM disk

wsl --shutdown
$Env:USERPROFILE\AppData\Local\Docker\wsl\data\ext4.vhdx
$Env:USERPROFILE\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04onWindows_79rhkp1fndgsc\LocalState\ext4.vhdx

Optimize-VHD -Mode Full <path> 

Bash

Load .env

set -o allexport; source .env; set +o allexport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment