| marp |
|---|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # I'll be doing another one for Linux, but this one will give you | |
| # a pop up notification and sound alert (using the built-in sounds for macOS) | |
| # Requires https://github.com/caarlos0/timer to be installed | |
| # Mac setup for pomo | |
| alias work="timer 60m && terminal-notifier -message 'Pomodoro'\ | |
| -title 'Work Timer is up! Take a Break 😊'\ | |
| -appIcon '~/Pictures/pumpkin.png'\ | |
| -sound Crystal" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Source: https://gist.github.com/6fb3e7da327df9203d9d4c184fcb5831 | |
| ############################################################################## | |
| # Combining Argo CD (GitOps), Crossplane (Control Plane), And Kubevela (OAM) # | |
| # https://youtu.be/eEcgn_gU3SM # | |
| ############################################################################## | |
| # Referenced videos: | |
| # - Argo CD - Applying GitOps Principles To Manage Production Environment In Kubernetes: https://youtu.be/vpWQeoaiRM4 | |
| # - Cloud-Native Apps With Open Application Model (OAM) And KubeVela: https://youtu.be/2CBu6sOTtwk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _APP_ENV=production | |
| _APP_LOCALE=en | |
| _APP_OPTIONS_ABUSE=enabled | |
| _APP_OPTIONS_FORCE_HTTPS=disabled | |
| _APP_OPENSSL_KEY_V1=your-secret-key | |
| _APP_DOMAIN=localhost | |
| _APP_DOMAIN_TARGET=localhost | |
| _APP_CONSOLE_WHITELIST_ROOT=enabled | |
| _APP_CONSOLE_WHITELIST_EMAILS= | |
| _APP_CONSOLE_WHITELIST_IPS= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "Building cluster_recovery.yml..." | |
| echo "Working on Nodes..." | |
| echo 'nodes:' > cluster_recovery.yml | |
| kubectl --kubeconfig kube_config_cluster.yml -n kube-system get configmap full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r .desiredState.rkeConfig.nodes | yq r - | sed 's/^/ /' | \ | |
| sed -e 's/internalAddress/internal_address/g' | \ | |
| sed -e 's/hostnameOverride/hostname_override/g' | \ | |
| sed -e 's/sshKeyPath/ssh_key_path/g' >> cluster_recovery.yml | |
| echo "" >> cluster_recovery.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check gist comments to verify system PATH and or adapt it. | |
| wget https://ftp.gnu.org/gnu/glibc/glibc-2.18.tar.gz | |
| tar zxvf glibc-2.18.tar.gz | |
| cd glibc-2.18 | |
| mkdir build | |
| cd build | |
| ../configure --prefix=/opt/glibc-2.18 | |
| make -j4 | |
| sudo make install | |
| export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/glibc-2.18/lib |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| wget https://storage.googleapis.com/kubernetes-helm/helm-v2.12.2-linux-amd64.tar.gz | |
| tar -zxvf helm-v2.12.2-linux-amd64.tar.gz | |
| mv linux-amd64/helm /usr/local/bin/helm | |
| kubectl -n kube-system create sa tiller | |
| kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller | |
| helm init --service-account tiller | |
| kubectl create namespace kubeapps | |
| helm install --name kubeapps --namespace kubeapps bitnami/kubeapps |
Follow the instructions on Github to Create an Access Token in Github
By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.
You can tell Git you want to store credentials in the osxkeychain by running the following:-
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Usage: ./get_kubeconfig_custom_cluster_rancher2.sh cluster_name | |
| # Needs to be run on the server running `rancher/rancher` container | |
| # Check if jq exists | |
| command -v jq >/dev/null 2>&1 || { echo "jq is not installed. Exiting." >&2; exit 1; } | |
| # Check if clustername is given | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 [clustername]" |
NewerOlder