Skip to content

Instantly share code, notes, and snippets.

View mw866's full-sized avatar
🇸🇬

Chris Wang mw866

🇸🇬
View GitHub Profile
@mw866
mw866 / #launch
Last active November 20, 2023 10:05
multipass
# https://multipass.run/install
multipass launch
multipass start
multipass stop
multipass list
multipass shell
@mw866
mw866 / terraform.sh
Last active June 14, 2023 05:06
#terraform
terraform graph | dot -Tsvg > graph.svg
terraform state list
terraform plan -out=FILENAME
@mw866
mw866 / docs.md
Last active April 10, 2023 08:12
VMware vSphere and Kubernetes
@mw866
mw866 / az.sh
Last active June 18, 2023 13:28
#az #azure
# https://learn.microsoft.com/en-us/cli/azure/authenticate-azure-cli
az login
#https://learn.microsoft.com/en-us/cli/azure/manage-azure-subscriptions-azure-cli#change-the-active-subscription
az account show
az account list
az account tenant list
az account set --subscription "My Demos"
# https://learn.microsoft.com/en-us/cli/azure/interactive-azure-cli
@mw866
mw866 / bootstrap.sh
Last active October 21, 2022 09:29
#raspberrypi
#on client
sudo vim cat .ssh/id_ed25519.pub
#on pi paste the public key
sudo vim .ssh/authorized_keys
# (optional) rename the hostname
sudo vim /etc/hostname
sudo vim /etc/hosts
@mw866
mw866 / helm.sh
Last active October 20, 2023 00:55
#k8s #kubernetes
# https://helm.sh/docs/intro/using_helm/
helm list
helm list -Aa # all NS all filter
helm get values <releasename> -n <namespace>
helm repo update
helm version --short
helm repo add wiz.io https://xxxx
helm pull xxxx
helm install test xxx --values xxx.yaml
@mw866
mw866 / mongo
Last active October 21, 2022 08:50
#mongoDB
show dbs
use testdb
db.dropDatabase()
db.test.find( {} )
db.test.remove({ "_id" : ObjectId("622fe6b767d3cd1a9e5d5eec") })
@mw866
mw866 / client.js
Created February 9, 2022 07:27
#javascript #js
window.location.href = 'https://www.example.com';
location.href;
document.body.innerHTML;
@mw866
mw866 / headless_chrome.sh
Created January 24, 2022 01:15
#chrome
#!/bin/zsh
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --disable-gpu --remote-debugging-port=9222 https://www.example.com
echo "Connec to the remote target at chrome://inspect/#devices`
read -p "Press Return to Close..."