diff --git a/bin/gren b/bin/gren deleted file mode 100755 index 2dff535..0000000 --- a/bin/gren +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -set -ex - -if [[ -z "$1" ]]; then - echo "Usage: $0 " - exit 1 -fi - -hub sync - -if git rev-parse --verify --quiet $1; then - git checkout $1 -else - git checkout -b $1 main - git push -u origin $1 -fi diff --git a/bin/ktail b/bin/ktail deleted file mode 100755 index 2969226..0000000 --- a/bin/ktail +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -kubectl get pod --output json \ - | jq -r '[.items[].metadata.labels]|map(to_entries[]|(.key) + "=" + .value)|unique|.[]' \ - | fzf \ - | xargs kubectl tail "$@" -l diff --git a/bin/pw b/bin/pw deleted file mode 100755 index 642ad2a..0000000 --- a/bin/pw +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# Author: Daniel Lundin -# -# Convenience script to hide sensitive variables on the command line. -# Uses keyctl to store secrets in the keyring. -# -# Example usage: mycommand --user=foo --password=$(pw mypass) - -set -eo pipefail - -purge=0 -ttl=${PW_TTL:-259200} - -usage() { echo "Usage: $0 [-t SECONDS] [-f] SECRET_NAME" 1>&2; exit 1; } - -while getopts ":ft:" o; do - case "${o}" in - f) - purge=1 - ;; - t) - ttl=${OPTARG} - ;; - *) - usage - ;; - esac -done -shift $((OPTIND-1)) - -var="$1" -shift || usage -[ -z "$1" ] || usage - -key="pw.${var}" - -if [ "${purge}" == "1" ]; then - keyctl purge user "${key}" >>/dev/null 2>&1 || true -fi - -out=$(systemd-ask-password --accept-cached --keyname="${key}" "${var}:") -key_id=$(keyctl request user "${key}" 2>/dev/null) -keyctl timeout "$key_id" "$ttl" - -printf "%s" "$out" diff --git a/bin/tmux-build-helper b/bin/tmux-build-helper deleted file mode 100755 index e27347c..0000000 --- a/bin/tmux-build-helper +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -ef -o pipefail -eval "$(direnv export bash)" -eval "${BUILD_COMMAND:-echo 'BUILD_COMMAND not set'}" | bat --paging=always diff --git a/bin/tmux-nvr b/bin/tmux-nvr deleted file mode 100755 index 12e869f..0000000 --- a/bin/tmux-nvr +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -tmux select-window -t1 -FILE="$1" -shift -exec nvr --remote "$@" $(readlink -f "$FILE")