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
| version: 3 | |
| tasks: | |
| dummy: | |
| cmds: | |
| - echo "dummy" |
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
| #! /usr/bin/env bash | |
| set -Eeuo pipefail | |
| scripts_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | |
| source "${scripts_dir}/functions.sh" | |
| test_jq | |
| test_yq | |
| test_kubeseal |
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
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| "unicode/utf8" | |
| "github.com/mattn/go-runewidth" | |
| "github.com/rivo/uniseg" | |
| ) |
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
| brew install jq | |
| brew install yq | |
| # render a helm chart to it's yaml parts | |
| helm fetch --repo https://containous.github.io/traefik-helm-chart --untar --untardir ./charts traefik | |
| helm template --output-dir ./manifests ./charts/traefik | |
| # OR | |
| helm template --output-dir ./loki-fluent-bit loki/fluent-bit |
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
| #!/usr/bin/env bash | |
| envfile="$HOME/.gnupg/gpg-agent.env" | |
| if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then | |
| eval "$(cat "$envfile")" | |
| else | |
| eval "$(gpg-agent --daemon --enable-ssh-support)" | |
| fi | |
| export GPG_AGENT_INFO # the env file does not contain the export statement | |
| export SSH_AUTH_SOCK # enable gpg-agent for ssh |
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
| #!/usr/bin/env bash | |
| # Start SSH Agent if not already started | |
| # https://stackoverflow.com/questions/18880024/start-ssh-agent-on-login | |
| SSH_ENV="$HOME/.ssh/environment" | |
| function start_agent { | |
| echo "Initialising new SSH agent..." | |
| /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
| echo succeeded |
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
| git config --local user.email ghost.squadron@gmail.com | |
| git config --local user.signingkey 1C08DB44DEC7CAFC | |
| git config --local core.sshCommand "ssh -i ~/.ssh/id_rsa_ghostsquad" | |
| git --no-pager config --local --list |
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
| #!/usr/bin/env bash | |
| function aws-creds-to-env { | |
| profile_name="${1:-default}" | |
| AWS_ACCESS_KEY_ID=$(aws configure get "${profile_name}.aws_access_key_id") | |
| export AWS_ACCESS_KEY_ID | |
| AWS_SECRET_ACCESS_KEY=$(aws configure get "${profile_name}.aws_secret_access_key") | |
| export AWS_SECRET_ACCESS_KEY | |
| } |
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
| # Docker | |
| alias drd='docker rmi $(docker images -f "dangling=true" -q)' | |
| alias dre='docker rm $(docker ps -a -f status=exited -q)' | |
| alias drc='docker rm $(docker ps -a -f status=created -q)' | |
| alias dps='docker ps --format '\''table {{ .ID }}\t{{ .Image }}\t{{ .Names }}\t{{ .Ports }}'\''' | |
| alias dpsa='docker ps -a --format '\''table {{ .ID }}\t{{ .Image }}\t{{ .Names }}\t{{ .Ports }}'\''' | |
| # Git | |
| # https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git | |
| # https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/git-extras/git-extras.plugin.zsh |
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
| func setup() func() { | |
| pool, err := dockertest.NewPool("") | |
| if err != nil { | |
| fmt.Printf("Could not connect to docker: %s\n", err) | |
| os.Exit(1) | |
| } | |
| pool.MaxWait = time.Second * 120 | |
| // pulls an image, creates a container based on it and runs it |