Skip to content

Instantly share code, notes, and snippets.

Avatar

Alan Voiski voiski

View GitHub Profile
View bash-record.sh
# 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
Extract trello cards by list
View export_trello.js
// 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 Jun 3, 2019
Add colors to the terragrunt output
View terragrunt_color.sh
#!/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 May 28, 2019 — forked from demosten/brewv.sh
Install specific version of a Homebrew formula
View brewv.sh
#!/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 Nov 21, 2018
Extract certificate
View extract_certificate.sh
#!/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 Jul 2, 2018
Pre commit template to append the branch name in the commit message
View install_commit_template_hook.sh
#!/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
You can’t perform that action at this time.