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
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: dex | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: dex |
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/sh | |
# The remote repo | |
remote="$1" | |
url="$2" | |
# Check each commit that's being pushed | |
while read local_ref local_sha remote_ref remote_sha | |
do | |
if [ "$remote_ref" = "refs/heads/master" ]; then |
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 | |
function help() { | |
echo "Usage: $(basename "$0") [COMMAND] [OPTIONS]" | |
echo | |
echo "A utility script to retrieve and display information about EKS clusters." | |
echo | |
echo "Commands:" | |
echo " node, nodes Get detailed information about nodes in the cluster." | |
echo |
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 | |
set -euo pipefail | |
# create cluster | |
cat <<EOF | kind create cluster --config=- | |
--- | |
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
nodes: |
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
[Desktop Entry] | |
Name=Browser Chooser | |
GenericName=Browser Chooser | |
Comment=Select a browser to access the Internet | |
Categories=Network;WebBrowser; | |
Icon=browser | |
Type=Application | |
Exec=browser-chooser.sh --url %u | |
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; |
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 | |
URL=$1 | |
DOMAIN=$(echo "$URL" | awk -F[/:] '{print $4}') | |
## Domain starts with | |
if [[ $DOMAIN =~ $(echo ^\($(paste -sd'|' /home/your-user/.config/url-start.txt)\)$) ]]; then | |
chromium-browser "$URL" & disown | |
elif [[ $DOMAIN =~ $(echo ^\($(paste -sd'|' /home/your-user/.config/url-is.txt)\)$) ]]; then | |
firefox "$URL" & disown |
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
# desc: open a new shell using aws-vault and use fzf to choose a profile if no profile is provided as argument | |
# desc: append "--stdout" to print the SSO login link instead of automatically opening a browser | |
# shell: zsh | |
aws-vault () { | |
local ARGS=("$@") | |
if [[ $1 == "exec" ]]; then | |
if [[ $# -eq 1 ]]; then | |
local AWS_PROFILE | |
AWS_PROFILE="$(command aws-vault list --profiles | fzf)" | |
ARGS=("exec" "$AWS_PROFILE" "--stdout") |
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 | |
set -euo pipefail | |
cat <<'EOF'> /tmp/minikube-br0.xml | |
<network> | |
<name>minikube</name> | |
<uuid>ec47d11f-87ba-4231-b38d-0efedd392b84</uuid> | |
<forward mode='nat'> | |
<nat> | |
<port start='1024' end='65535'/> |
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 | |
# variables | |
export K3S_KUBECONFIG_MODE="666" | |
# install K3s | |
curl -sfL https://get.k3s.io | sh -s - \ | |
--disable-network-policy \ | |
--disable "servicelb" \ | |
--disable "traefik" \ |
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 | |
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC='--flannel-backend=none' sh -s - \ | |
--disable-network-policy \ | |
--disable "servicelb" \ | |
--disable "traefik" \ | |
--disable "metrics-server" | |
sudo cat /etc/rancher/k3s/k3s.yaml > ~/.kube/config | |
kubectl create -f https://raw.githubusercontent.com/cilium/cilium/v1.7/install/kubernetes/quick-install.yaml |