Skip to content

Instantly share code, notes, and snippets.

View williamokano's full-sized avatar
🎯
println("Kotlin is nice")

William Okano williamokano

🎯
println("Kotlin is nice")
View GitHub Profile
@williamokano
williamokano / git-find-me-the-fucking-deleted-file.sh
Created April 14, 2021 10:58 — forked from joakin/git-find-me-the-fucking-deleted-file.sh
finding a deleted file in a git repository
# If you don't remember the exact path/name, search the log for deleted files
git log --diff-filter=D --summary | grep delete
# Find the file you want to get from the ouput, and use the path
# Find the commits that involved that path
git log --all -- some/path/to/deleted.file
# Bring the file back to life to the current repo (sha commit of parent of commit that deleted)
g co shaofthecommitthatdeletedthefile^ -- some/path/to/deleted.file
@ThYpHo0n
ThYpHo0n / .zshrc
Last active August 5, 2024 01:37
WSL(2) bash profile helpers
# WSL?
if [[ "$(< /proc/sys/kernel/osrelease)" == *microsoft* ]]; then
export $(dbus-launch)
export LIBGL_ALWAYS_INDIRECT=1
export WSL_VERSION=$(wsl.exe -l -v | grep -a '[*]' | sed 's/[^0-9]*//g')
export WSL_HOST=$(tail -1 /etc/resolv.conf | cut -d' ' -f2)
export DISPLAY=$WSL_HOST:0
# pip path if using --user
export PATH=$PATH:$HOME/.local/bin
# SSH