Skip to content

Instantly share code, notes, and snippets.

View run-tasks-in-parallel.bash
#!/usr/bin/env bash
set -euo pipefail
declare -r IFS=$'\n'
declare -r SPAWNED_LIST=$(mktemp)
declare -r SPAWNED_LIMIT=20
task() {

How to facilitate a retrospective

The role of Facilitator is fundamental for almost every meeting. The Facilitator ensures that the whole group is empowered to make decisions and that every individual has their voice heard.

During a retrospective, the Facilitator role is crucial. In a retrospective, it is ideal that everyone has at least some degree of participation, and it is the Facilitator that helps the participants with that.

henriquemoody / see-also.bash
Created Dec 11, 2018
Updates "See also" section for the Respect\Validation rules.
View see-also.bash
while read filename; do
declare rule=$(cut -d '/' -f 2 <<< "${filename}" | cut -d '.' -f 1)
declare related_rules=$(
egrep '\[.+\]\(.+\.md\)' "${filename}" |
sed -E 's,.*\[.+\]\((.+)\.md\).*,\1,' |
egrep -v '(ComparableValues|BaseAccount|Vxdigit)'
for related_rule in ${related_rules}; do
View convertObject.php
// Based on
function convertObject($object, string $from, string $to)
// Serialize
$serialized = serialize($object);
// Replace the object-type
$objectReplaced = preg_replace(
henriquemoody / add-authors
Last active Nov 30, 2018
Example: list-authors name/of/file
View add-authors
#!/usr/bin/env bash
# Usage: {script} FILENAME
# Add the list of authors to a PHP or PHPT file.
# The list of authors is generated by the `git blame` command.
# --help, -h Displays this help
# Report bugs to Henrique Moody <>.
View git-fixup
#!/usr/bin/env bash
# Usage: {script} PATH
# Construct a commit message for use with rebase --autosquash.
# The commit message will be the subject line from the specified commit with a
# prefix of "fixup! " and will contain the changes on the PATH.
# --help, -h Displays this help
# Report bugs to Henrique Moody <>
henriquemoody / restbash
Last active Oct 8, 2015
A REST client written in Bash
View restbash
#!/usr/bin/env bash
# Usage: {script} SCRIPT
# --dry-run Displays the request but doesn't not perform it.
# Report bugs to Henrique Moody <>
if [[ -z "${1}" ]] || [[ ! -f "${1}" ]]; then
sed -E 's/^#\s?(.*)/\1/g' "${0}" |
henriquemoody / br-cities.php
Last active Jun 1, 2020
Lista de cidades brasileiras com base nos dados o IBGE
View br-cities.php
return [
// (Thu May 14 16:30:15 BRT 2015)
'AC' => [
1200013 => 'Acrelândia',
1200054 => 'Assis Brasil',
1200104 => 'Brasiléia',
1200138 => 'Bujari',
1200179 => 'Capixaba',
View country-subdivision.bash
#!/usr/bin/env bash
set -e
declare DIRECTORY=$(dirname "${BASH_SOURCE}")
declare URL="${1}"
declare ENTRY=$(echo "${1}" | cut -d '/' -f 4)
declare FILE_HTML="${DIRECTORY}/html/${ENTRY}.html"
declare FILE_TEXT="${DIRECTORY}/text/${ENTRY}.text"
View mysql_backup.bash
#!/usr/bin/env bash
set -e
DATE_REMOVAL=$(date -d "20 day ago" "+${DATE_FORMAT}")