Skip to content

Instantly share code, notes, and snippets.

View mayooot's full-sized avatar
:fishsticks:
Focusing

Harry Li mayooot

:fishsticks:
Focusing
  • Beijing
View GitHub Profile
@timotgl
timotgl / uninstall-logitech-ghub.sh
Created April 4, 2022 12:15
How to fully uninstall Logitech G HUB on macOS via terminal/command line
# How to fully uninstall Logitech G HUB on macOS via terminal/command line
# Tested on macOS version 12.3.1 (21E258) Monterey in April 2022
# with Logitech G HUB version 2022.3.242300 (released on 2022-03-22) installed.
# 1. Make sure "Logitech G HUB" itself is not running. If it is, quit it.
# 2. Open "Activity Monitor" and force-quit all processes named "lghub*".
# 3. Delete system-wide files
sudo rm -rf /Applications/lghub.app
@enriched
enriched / in-pod-kubeconfig.sh
Last active July 6, 2024 10:42
Create kubeconfig inside pod
SERVICE_ACCOUNT_DIR="/var/run/secrets/kubernetes.io/serviceaccount"
KUBERNETES_SERVICE_SCHEME=$(case $KUBERNETES_SERVICE_PORT in 80|8080|8081) echo "http";; *) echo "https"; esac)
KUBERNETES_SERVER_URL="$KUBERNETES_SERVICE_SCHEME"://"$KUBERNETES_SERVICE_HOST":"$KUBERNETES_SERVICE_PORT"
KUBERNETES_CLUSTER_CA_FILE="$SERVICE_ACCOUNT_DIR"/ca.crt
KUBERNETES_NAMESPACE=$(cat "$SERVICE_ACCOUNT_DIR"/namespace)
KUBERNETES_USER_TOKEN=$(cat "$SERVICE_ACCOUNT_DIR"/token)
KUBERNETES_CONTEXT="inCluster"
mkdir -p "$HOME"/.kube
cat << EOF > "$HOME"/.kube/config