In my bash aliases
alias vi="_waiting_code"
_waiting_code() {
code -n --wait "$@"
}
mystats() { | |
repos=( | |
"rlespinasse/github-slug-action" | |
"rlespinasse/git-commit-data-action" | |
"rlespinasse/drawio-export-action" | |
"rlespinasse/release-that" | |
"rlespinasse/slugify-value" | |
"rlespinasse/shortify-git-revision" | |
) | |
for repo in ${repos[*]}; do |
#!/usr/bin/env bash | |
# Get path of ssh key | |
ssh_pub_path=$(find ~/.ssh/*.pub | fzf -1) | |
ssh_path=${ssh_pub_path//.pub/} | |
# Signature par SSH | |
git config --global gpg.format ssh | |
# Signature automatique des commits et tags | |
git config --global commit.gpgsign true |
#!/usr/bin/env bash | |
purp='\x1b[38;5;171m' | |
# shellcheck disable=SC2086 | |
has?() { hash $1 2>/dev/null; } | |
quit() { echo -e "\x1b[2J \x1b[0H ${purp}<3 \x1b[?25h \x1b[u \x1b[m"; } | |
trap "quit" EXIT | |
# shellcheck disable=SC2211 |
#!/usr/bin/env bash | |
set -eo pipefail | |
set -u | |
IFS=$'\n\t' | |
command -v fzf >/dev/null 2>&1 || { | |
echo >&2 "I require fzf but it's not installed. Aborting." | |
exit 1 | |
} |
#!/bin/bash | |
youtube-dl --extract-audio --audio-format mp3 $1 |
task-with-vars-setup: KEY=$(shell ./get-key) | |
task-with-vars-setup: VALUE=$(shell ./get-value) | |
task-with-vars-setup: | |
@echo The key is $(KEY) | |
@echo The value is $(VALUE) | |
./call-script-with $(KEY) $(VALUE) |
task-who-need-specific-envvar: guard-SPECIFIC_ENVVAR | |
@echo ${SPECIFIC_ENVVAR} | |
guard-%: | |
@ if [ "${${*}}" = "" ]; then \ | |
echo "Environment variable $* not set"; \ | |
exit 1; \ | |
fi | |
# $ make task-who-need-specific-envvar |
#!/usr/bin/env groovy | |
pipeline { | |
agent any | |
stages { | |
stage('Project Build') { | |
when { | |
beforeAgent true | |
not { changelog '.*\\[ci skip\\].*' } |
#!/bin/bash | |
# Initialize applicative variables | |
dirname=$(dirname "$(greadlink -f "$0")") | |
basename=$(basename "$0") | |
filename=${basename%.*} | |
logdir=${dirname} | |
logfile=${filename}.log | |
exec &> >(tee -a "${logdir}/${logfile}") |