Skip to content

Instantly share code, notes, and snippets.

Henrique Moody henriquemoody

Block or report user

Report or block henriquemoody

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View how-to-facilitate-a-retrospective.md

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
henriquemoody / see-also.bash
Created Dec 11, 2018
Updates "See also" section for the Respect\Validation rules.
View see-also.bash
declare -A REFERENCES
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
<?php
// Based on https://stackoverflow.com/questions/965611/forcing-access-to-php-incomplete-class-object-properties
function convertObject($object, string $from, string $to)
{
// Serialize
$serialized = serialize($object);
// Replace the object-type
$objectReplaced = preg_replace(
@henriquemoody
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 <henriquemoody@gmail.com>.
#
View gfixup
#!/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@gmail.com>
#
@henriquemoody
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 <henriquemoody@gmail.com>
#
if [[ -z "${1}" ]] || [[ ! -f "${1}" ]]; then
sed -E 's/^#\s?(.*)/\1/g' "${0}" |
@henriquemoody
henriquemoody / br-cities.php
Last active Jan 19, 2018
Lista de cidades brasileiras com base nos dados o IBGE
View br-cities.php
<?php
return [
// http://www.cidades.ibge.gov.br/download/mapa_e_municipios.php?uf=ac (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_FORMAT="%Y-%m-%d"
DATE_CREATION=$(date "+${DATE_FORMAT}")
DATE_REMOVAL=$(date -d "20 day ago" "+${DATE_FORMAT}")
DIRECTORY_BASE="/backup/mysql"
DIRECTORY_CREATION="${DIRECTORY_BASE}/${DATE_CREATION}"
View HttpException.php
<?php
class HttpException extends \Exception
{
/**
* List of additional headers
*
* @var array
*/
private $headers = array();
You can’t perform that action at this time.