Skip to content

Instantly share code, notes, and snippets.

View gadiener's full-sized avatar

Gabriele gadiener

View GitHub Profile
@gazoakley
gazoakley / Jenkinsfile
Last active May 23, 2025 14:55
Jenkinsfile for running Terraform
pipeline {
agent any
parameters {
string(name: 'environment', defaultValue: 'default', description: 'Workspace/environment file to use for deployment')
string(name: 'version', defaultValue: '', description: 'Version variable to pass to Terraform')
booleanParam(name: 'autoApprove', defaultValue: false, description: 'Automatically run apply after generating plan?')
}
environment {
@kopiro
kopiro / backup-repos.sh
Last active October 15, 2018 10:39
Backup all Repositories in current directory
backup-repos() {
for i in $(find . -type d -maxdepth 1 -mindepth 1); do
echo "Looking in $i..."
if [ -d "$i/.git" ]; then
echo "Found repository in $i, init backup..."
pushd $i > /dev/null
zip_name="$i-$(date +'%y%m%d').zip"
zip_path="/opt/backups/$zip_name"
echo "ZIP path: $zip_path"
if [ ! -f "$zip_path" ]; then
@vinzdef
vinzdef / togif.sh
Created January 9, 2019 13:31
togif - quickly convert video to hq gif with ffmpeg
ffmpeg -i $1 -filter_complex "[0:v] fps=40,scale=800:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" ${1%.*}.gif
# Source: https://gist.github.com/2e67c67a36a2e782422ebefb4a0a2612
############################################################################
# How To Use Terrajet Providers With 100% Coverage for AWS, GCP, And Azure #
# https://youtu.be/QSwF3Y4ViKQ #
############################################################################
# Additional Info:
# - Terrajet: https://github.com/crossplane/terrajet
# - How To Shift Left Infrastructure Management Using Crossplane Compositions: https://youtu.be/AtbS1u2j7po
@MateusTymoniuk
MateusTymoniuk / prepare-commit-msg
Last active May 19, 2025 07:38
prepare-commit-msg git hook to add jira ticket number to beginning of the commit msg
#!/bin/bash
# Hook based on this article: https://andy-carter.com/blog/automating-git-commit-messages-with-git-hooks
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
branch=$(git branch --show-current)