Skip to content

Instantly share code, notes, and snippets.

View exaV's full-sized avatar

Patrick Del Conte exaV

View GitHub Profile
@exaV
exaV / gitall.sh
Created December 30, 2021 09:40
run a git command in all subdirectories
# output path to child directories which contain a .git folder
alias findgitdirs='find . -maxdepth 2 -type d -name ".git" | sed -e "s|/.git||"'
gitall(){
# execute the argument as a git command in all (git) subdirectories
# if there are no arguments then print all of the directorries that would be used
if [ "$#" -eq 0 ]; then findgitdirs; return; fi
findgitdirs | xargs -I{} git -C {} "$@"
}
@exaV
exaV / Webgl2.Readme.md
Last active May 25, 2022 13:22
Kotlin type definitions for Webgl 2

Kotlin type definitions for Webgl 2

Usage:

fun main(){
    val canvas = document.createElement("canvas") as HTMLCanvasElement
    canvas.width = 800
    canvas.height = 600

 val gl = canvas.getContext("webgl2") as WebGL2RenderingContext
@exaV
exaV / alpine.sh
Last active June 28, 2023 12:51
run Alpine Linux with corporate proxy setup
docker run --rm -it --network=host -e http_proxy="$HTTP_PROXY" -e https_proxy="$HTTPS_PROXY" -v $PWD/corporate_proxy.crt:/usr/local/share/ca-certificates/proxy.crt --entrypoint /bin/sh alpine -c "cat /usr/local/share/ca-certificates/proxy.crt >> /etc/ssl/certs/ca-certificates.crt; /bin/sh"
@exaV
exaV / gitclean.sh
Created January 5, 2024 09:49
cleanup git branches that have no remote
# git branch -vv (verbose) marks deleted branches with : gone
git branch -vv | rg gone | fzf -m --bind ctrl-a:select-all | awk '{print $1}' | xargs -I {} git branch -D '{}'