Skip to content

Instantly share code, notes, and snippets.


Rodrigo Fernandes rtfpessoa

View GitHub Profile
rtfpessoa /
Created Sep 24, 2016 — forked from c00kiemon5ter/
a portable shell script to upgrade cask packages
usage() {
cat <<-EOF
${0##*/} [options]
View play.scala
* Single-file play framework application! Make sure everything
* works, as this is the test case that un-earthed #371
load.ivy("" %% "play" % "2.5.0")
load.ivy("" %% "play-netty-server" % "2.5.0")
load.ivy("org.scalaj" %% "scalaj-http" % "2.2.1")
rtfpessoa /
Created May 21, 2016 — forked from cvrebert/
Survey of screenshot-based CSS testing tools

Currently considering

Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
rtfpessoa / .config
Last active Aug 11, 2019 — forked from sit/gitproxy-socat
Wrappers around socat and netcat to use git behind a proxy
View .config
# Use netcat to proxy git ssh through a proxy.
# Useful if you are trying to clone ssh:// from inside a company.
# Save this file as `~/.ssh/config`
# See for Emil Sit's original HTTP proxy script.
# See for updated SOCKS version.
ProxyCommand nc -x %h %p
rtfpessoa /
Created Mar 16, 2016 — forked from brunomlopes/
Simple api to fetch accounts, balances and transactions from Caixa Geral de Depósitos's ( CGD ) API used by their Windows 8 application.
# gist:
# Usage:
# session = cgd.CgdSession(uid, password)
# session.login()
# session.load_latest_transactions(account_key)
# 'session.known_accounts' is now populated with the initial accounts taken from the login response,
# and the data for the 'account_key' account.
# session.load_latest_transactions(account_key) loads the latest transactions and balances for a given account.
rtfpessoa / gist:f3767a7cb2b7d6d62783
Last active Sep 6, 2015 — forked from gcatlin/gist:1847248
Install specific version of Homebrew formula
View gist:f3767a7cb2b7d6d62783
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
rtfpessoa /
Last active Sep 6, 2015 — forked from uchida/
MacTeX uninstaller script based on pkgutil command
# MacTeX uninstaller script based on pkgutil command
# by Akihiro Uchida, CC0 dedicated to the public domain
# see
IFS=$(echo -en "\n")
for pkg in $(pkgutil --pkgs|grep org.tug.mactex); do
volume="$(pkgutil --pkg-info "$pkg"|grep volume|cut -d' ' -f2-)"
location="$(pkgutil --pkg-info "$pkg"|grep location|cut -d' ' -f2-)"
echo "remove all of the files installed under the $pkg"
for file in $(pkgutil --files "$pkg"); do

Get Git log in JSON format

git log --pretty=format:'{%n  "commit": "%H",%n  "abbreviated_commit": "%h",%n  "tree": "%T",%n  "abbreviated_tree": "%t",%n  "parent": "%P",%n  "abbreviated_parent": "%p",%n  "refs": "%D",%n  "encoding": "%e",%n  "subject": "%s",%n  "sanitized_subject_line": "%f",%n  "body": "%b",%n  "commit_notes": "%N",%n  "verification_flag": "%G?",%n  "signer": "%GS",%n  "signer_key": "%GK",%n  "author": {%n    "name": "%aN",%n    "email": "%aE",%n    "date": "%aD"%n  },%n  "commiter": {%n    "name": "%cN",%n    "email": "%cE",%n    "date": "%cD"%n  }%n},'

The only information that aren't fetched are:

  • %B: raw body (unwrapped subject and body)
  • %GG: raw verification message from GPG for a signed commit