Skip to content

Instantly share code, notes, and snippets.

@jhilker98
Last active December 5, 2022 19:02
Show Gist options
  • Save jhilker98/645df7e8d6521f0bb1dd21e1d33bb957 to your computer and use it in GitHub Desktop.
Save jhilker98/645df7e8d6521f0bb1dd21e1d33bb957 to your computer and use it in GitHub Desktop.
my shell functions, building iosevka, defining stuff, and creating gitignores
function buildFont {
iosevka_ver=$(awk 'NR==1{print $2}' $HOME/josevka/build.org | cut -d'v' -f2)
fonts=("josevka" "josevka-mono" "josevka-code" "josevka-code-mono" "josevka-book-sans" "josevka-book-slab")
font=$(printf "%s\n" "${fonts[@]}" | fzf)
docker run -e "FONT_VERSION=$iosevka_ver" -i -v "~/josevka":/build avivace/iosevka-build
}
zle -N buildFont{,}
bindkey -s '^mf' buildFont^M
function define {
dict $1
}
function gi {
toIgnore="$(curl -sLw "\n" https://www.toptal.com/developers/gitignore/api/list | sed 's/,/\n/g' | fzf -m | xargs | sed 's/\s/,/g')"
curl -sL "https://www.toptal.com/developers/gitignore/api/$toIgnore" >> .gitignore
}
toWorkOn(){
workon $(lsvirtualenv -b | fzf)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment