Skip to content

Instantly share code, notes, and snippets.

View augustohp's full-sized avatar

Augusto Pascutti augustohp

View GitHub Profile
@augustohp
augustohp / run.php
Created May 30, 2014 02:30
Usar array estoura a memória do PHP.
<?php
function printResults()
{
$startOfRequest = $_SERVER['REQUEST_TIME'];
$memoryUsed = formatBytes(memory_get_usage());
$memoryPeak = formatBytes(memory_get_peak_usage());
echo <<<EOT
Memory usage: $memoryUsed
Memory peak: $memoryPeak
@augustohp
augustohp / mailcatcher.sh
Last active April 24, 2019 07:18 — forked from dakatsuka/mailcatcher.sh
Mailcatcher init script for Debian.
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: mailcatcher
# Required-Start: $local_fs $network $syslog $portmap
# Required-Stop: $local_fs $network $syslog $portmap
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: false
# Short-Description: Start/stop mailcatcher daemon.
### END INIT INFO
@augustohp
augustohp / code2rtf
Last active March 8, 2016 04:28
Wrapper to `highlight` tool, with sensible defaults and ease to use on directories
#!/usr/bin/env bash
#
# vim: et ts=4 sw=4 ft=sh:
declare -r SCRIPT_NAME=$0
declare -r THEME_LIGHT="Seashell"
declare -r THEME_DARK="Zenburn"
declare -r TAB_SPACES=4
declare -r LINE_NUMBER_COLUMN_LENGTH=4
declare -r OUTPUT_ENCODING=UTF-8
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Debian-compatible Xvfb startup script.
# Tom Meier <[email protected]>
# Jeffery Fernandez <[email protected]>
#
### BEGIN INIT INFO
# Provides: xvfb_daemon
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
@augustohp
augustohp / saude-testes.md
Created March 27, 2015 05:26
Post: Como anda a saúde dos seus testes?

Como está a saúde dos seus testes?

Testes automatizados são bons. Eles podem ser melhores? Quanto valor testes automatizados podem acrescentar a sua empresa?

Como está a saúde dos seus testes?

Como num checkup, você pode saber se sua suíte de testes está com uma boa saúde ou não. As respostas às perguntas abaixo podem ajudar:

  1. Eles quebram quando um corportamento muda porque as expectativas deles eram outras?
  2. Eles guiam o desenvolvedor a corrigí-los ao invés de só apontar uma falha?
@augustohp
augustohp / github-pandoc.css
Last active December 15, 2017 06:41 — forked from dashed/github-pandoc.css
A GitHub-like CSS for Markdown files rendered in HTML with pandoc.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@augustohp
augustohp / git-bacon_ratio.sh
Last active April 24, 2019 07:11
How good is a commit? The bigger the commit message, more thought was put into that commit
#!/bin/sh
CSV_OUTPUT=0
_main()
{
header_printed=""
for commit in $(repository_commits)
do
changed_lines=$(diff_stat_of $commit)
@augustohp
augustohp / brazilian-names-and-gender.csv
Last active June 6, 2025 16:07
Brazilian names and gender (Male and Female) list for training data sets
Name Gender
Abel M
Abelardo M
Abner M
Abraão M
Absalom M
Absirto M
Abstêmio M
Abud M
Abundâncio M
@augustohp
augustohp / homeshick-install.sh
Last active October 22, 2023 01:00
Homeshick bootstrap script
#!/usr/bin/env bash
# Author: Devin Waever <https://github.com/sukima>
# Author: Augusto Pascutti <[email protected]>
# Original source: https://github.com/sukima/dotfiles/blob/gh-pages/homeshick.sh
# For Windows : https://gist.github.com/augustohp/15183d64bcba18a9a773b7402ea63801
# Fork source : https://gist.github.com/augustohp/0b0f96249e399d4ec731830280fbe776
#
# Installs homeshick and clones castles of interest
# Usage: bash <(curl -Ls https://git.io/fNMTH)
@augustohp
augustohp / git-report-inactive.sh
Created October 9, 2018 20:29
Report Git repositories that do not have commits for a given time
#!/usr/bin/env bash
# vim: ft=sh:
APP_NAME=$(basename $0)
APP_VERSION="1.0.0"
OPTION_ACTIVE_IS="6 month ago"
command_help()
{
cat <<-EOT