Install the OpenSSL on Debian based systems
sudo apt-get install openssl
#!/usr/bin/env bash | |
# https://gist.githubusercontent.com/nielswind/8a9e2ae451ff6b690f9baff6a28851ba/raw/extract.sh | |
function depcheck() { | |
local DEPS=($*) | |
for cmd in "${DEPS[@]}" | |
do | |
[[ $(command -v $cmd 2>/dev/null) ]] || { echo -en "\n$cmd needs to be installed.";fail=1; } | |
done | |
[[ $fail -ne 1 ]] || { echo -en "\n${0}: Install the above and rerun this script\n";exit 1; } |
blueprint: | |
name: Garbage collection alert | |
description: Do action (alert) in case garbage collection is today at specific time | |
domain: automation | |
input: | |
time: | |
name: Time to test on | |
description: Test is run at configured time | |
default: '10:00:00' | |
selector: |
blueprint: | |
name: Motion-activated Light connected to Switch | |
description: Turn on a light when motion is detected. | |
domain: automation | |
source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml | |
input: | |
motion_entity: | |
name: Motion Sensor | |
selector: | |
entity: |
#!/bin/bash | |
# list remote branches not having local branch with same name | |
set -euo pipefail | |
IFS=$'\n\t' | |
comm -23 <(git branch -r|cut -d"/" -f2-|sort|grep -v HEAD) <(git branch|cut -c3-|sort) |
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
[[ -x `which fzf` ]] || (echo fzf required; exit 1) | |
export FZF_DEFAULT_OPTS='--height 40% --border' | |
B=$((git-notlocal) | fzf -1 --prompt 'checkout remote branch: ' | tr -s ' '|cut -d" " -f2) | |
[[ ! -e "$B" ]] && git checkout $B |
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
FILES=($*) | |
for val in "${FILES[@]}"; do | |
echo $val | |
#[[ $SRT =~ ((\.en)?(\.da)?\.srt$) ]] && echo "${BASH_REMATCH[1]}" | |
done |
#!/bin/bash | |
# fast select and change branch in git using fzf | |
set -euo pipefail | |
IFS=$'\n\t' | |
SEARCH="$*" | |
if [[ '-' == "${SEARCH}" ]]; | |
then | |
git checkout - | |
exit $? |
I hereby claim:
To claim this, I am signing this object: