Skip to content

Instantly share code, notes, and snippets.

View filipedfs's full-sized avatar
👨‍🎓
In the middle of the journey

Filipe Fonseca filipedfs

👨‍🎓
In the middle of the journey
View GitHub Profile
@filipedfs
filipedfs / .bashrc
Created November 4, 2021 20:27
Show git branch on terminal
# Add this code to .bashrc or .bash_profile file on ~/
# \u: usuário atual
# \h: nome da máquina (host)
# \H: nome da máquina completo
# \w: diretório de trabalho atual
# \W: diretório de trabalho atual com o nome base (último segmento) apenas
# $(__git_ps1 "%s"): branch atual caso esteja em um repositório git, senão exibe nada.
# azul: \[\033[0;34m\]
# vermelho: \[\033[0;31m\]
# vermelho fluorescente: \[\033[1;31m\]
@filipedfs
filipedfs / kubefwd.sh
Created December 7, 2021 02:44
kubefwd working command
sudo --preserve-env kubefwd svc -n foo
@filipedfs
filipedfs / git-post-push-function.sh
Created March 28, 2022 21:27 — forked from koddsson/git-post-push-function.sh
Runs a `post-push` hook after a successful run of `git push`
git() {
ROOT="$(/usr/bin/git rev-parse --show-toplevel)"
LOCATION="/.git/hooks/post-push"
if [ "$1" == "push" ] && [ -f "$ROOT$LOCATION" ]; then
/usr/bin/git $* && eval $ROOT$LOCATION
else
/usr/bin/git $*
fi
}
@filipedfs
filipedfs / script.sh
Created July 9, 2023 12:26
Create a python virtual environment
python3 -m venv path-to-venv # Normally I use "venv" as the name of the folder
source path-to-venv/bin/activate
@filipedfs
filipedfs / AnalyzeMethodHierarchy.ipynb
Created October 13, 2025 23:21
Find class usages using Kotlin Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.