Skip to content

Instantly share code, notes, and snippets.

View andreloureiro's full-sized avatar

André Loureiro andreloureiro

  • Sao Paulo, Brazil
View GitHub Profile
@andreloureiro
andreloureiro / ttfb.sh
Last active October 1, 2021 12:53
Latency percentile
#!/bin/bash
# ntimes: https://github.com/yuya-takeyama/ntimes - or `repeat` if using zsh
# percentile: https://github.com/yuya-takeyama/percentile
# usage: ttfb URL [TIMES] | percentile
TIMES=${2:-100}
(ntimes $TIMES -- \
@andreloureiro
andreloureiro / useEffectDebugger.js
Created June 11, 2024 16:42
useEffect debugger
/**
* From https://stackoverflow.com/a/59843241/24205983
*
* Example 1
*
* Before:
* ```
* useEffect(() => {
* // useEffect code here...
* }, [dep1, dep2])