Skip to content

Instantly share code, notes, and snippets.

View gabrielfalcao's full-sized avatar
👨‍💻
probably writing tests

Gabriel Falcão gabrielfalcao

👨‍💻
probably writing tests
View GitHub Profile
554: export PS1="\[$(tput setaf 45)\]\W\[$(tput setaf 199)\]\$(git_branch)\[\e[0m$(tput setaf 190)\]\$\e[0m \[$(tput sgr0)\]\[\e[0m\]"
@gabrielfalcao
gabrielfalcao / jest.pyramid.config.js
Created November 17, 2021 15:18
Jest Config to declare a test pyramid based on "projects"
// Example of test pyramid using jest
// Basic usage:
// jest --selectProjects 'unit tests'
// Assumes that you organize tests under __${type}_tests__/**/*.js
//
const path = require('path');
const correctPath = value => path.resolve(__dirname, value || '');
@gabrielfalcao
gabrielfalcao / git-ssh-pk.sh
Created June 8, 2021 13:19
Configure private key for git repo
git config core.sshCommand "ssh -i ~/.ssh/id_rsa_example -F /dev/null"
#!/usr/bin/env bash
set -e
OLD_DATE="$(git show HEAD -q | grep Date | cut -d: -f2-)"
NEW_DATE="$(date)"
OLD_HASH=$(git show HEAD -q | head -1 | awk '{print $2}')
pretty() {
colorcode="${1}"
shift
string="${*}"
@gabrielfalcao
gabrielfalcao / osx-quarantine-delete.sh
Created February 4, 2021 19:50
remove Emacs.app from Mac OSX quarantine via command-line
sudo xattr -d com.apple.quarantine /Applications/Emacs.app
Black Lives Matter!
Please check out ways you can help out the movement:
https://blacklivesmatters.carrd.co/
@gabrielfalcao
gabrielfalcao / README.md
Last active June 3, 2020 12:16
Go-VCR Example

Usage

go test ./...
@gabrielfalcao
gabrielfalcao / segfault.py
Created December 19, 2019 14:33 — forked from coolreader18/segfault.py
Make CPython segfault in 5 lines of code.
class E(BaseException):
def __new__(cls, *args, **kwargs):
return cls
def a(): yield
a().throw(E)