Skip to content

Instantly share code, notes, and snippets.

View voiski's full-sized avatar

Alan Voiski voiski

View GitHub Profile
# Add it in your alias
# usage: bash-record final_gif_name speed:optional cast_file:optional
#
# Requires asciinema and docker.
# Optional to have gifsicle for gif optimization.
#
# Examples:
# bash-record testing-command-x
# bash-record slow-recording-x 2
# bash-record please-faster-x 20 /tmp/slow-recording-x.cast
@voiski
voiski / export_trello.js
Last active May 12, 2020 23:14
Extract trello cards by list
// How to use it:
// 1. Press Command + Option + J (Mac) or Control + Shift + J (Windows, Linux, Chrome OS)
// 2. Copy and past in the console.
// About the functions
// - for js map: trelloExport.export()
// - print each list with cards: trelloExport.print()
(function () {
@voiski
voiski / terragrunt_color.sh
Last active June 3, 2019 20:10
Add colors to the terragrunt output
#!/bin/bash
set -o pipefail
BOLD=$(tput bold)
BLACK=$(tput setaf 0)
RED=$(tput setaf 1)
GREEN=$(tput setaf 2)
YELLOW=$(tput setaf 3)
BLUE=$(tput setaf 4)
CYAN=$(tput setaf 6)
@voiski
voiski / brewv.sh
Last active April 15, 2021 08:50 — forked from demosten/brewv.sh
Install specific version of a Homebrew formula
#!/bin/bash
#
# Install specific version of a Homebrew formula
#
# Usage: brewv.sh install|upgrade formula_name desired_version
#
# Notes:
# - this may unshallow your brew repo copy. It might take some time the first time
# you call this script.
# - my "git log" uses less by default and when that happens it breaks the script
@voiski
voiski / extract_certificate.sh
Last active November 21, 2018 00:24
Extract certificate
#!/bin/bash
# Extract certificate from the target domain.
# Usage:
# ./extract_certificate.sh {{domain name}} {{target port:default 443}}
# Example:
# curl -L https://git.io/fp8Za | bash -s google.com
# curl -L https://git.io/fp8Za | bash -s google.com 443
target=$1
port=${2:-443}
@voiski
voiski / install_commit_template_hook.sh
Last active July 2, 2018 19:13
Pre commit template to append the branch name in the commit message
#!/bin/ssh
# Script to configure a prepare commit msg hook to concatenate your branch name into at begin of your commit message.
# This is usefull if you work with jira or other track tool.
# To run it, simple run the bellow line:
# curl -Ssf https://gist.githubusercontent.com/voiski/7f7bde735d106ea8ed7864d95f04dec4/raw/install_commit_template_hook.sh|bash
# Creating file on your home folder
mkdir -p ~/.git-templates/hooks