This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias nxchlist="nix-channel --list" | |
alias nxchupdate="nix-channel --update nixpkgs" | |
alias nxgc="nix-collect-garbage -d" | |
alias nxinstall="nix-env -f '<nixpkgs>' -iA" | |
alias nxupgrade="nix-env -u '*'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function asdf_install_elixir() { | |
asdf install erlang $1 \ | |
&& asdf install elixir $2 | |
} | |
function asdf_global_elixir() { | |
asdf global erlang $1 \ | |
&& asdf global elixir $2 \ | |
&& mix local.hex --force \ | |
&& mix local.rebar --force \ | |
&& mix archive.install hex phx_new --force; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias brewupgrade="brew upgrade && brew upgrade --cask --greedy" | |
alias cat="cat -vet" | |
alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" | |
alias watermarkos="cd ~/Documents/Projects/Vids && ./watermarkos.sh && cd -" | |
alias zlong="eza --long --header --time-style=long-iso --group-directories-first --all --group --classify" | |
alias zla="eza --long --header --time-style=long-iso --group-directories-first --all --classify --no-permissions --no-user" | |
alias ytdlaudio='yt-dlp --ignore-errors --output "%(title)s.%(ext)s" --extract-audio --audio-format mp3' | |
alias ytdlvideo='yt-dlp -f "bestvideo[height<=1080][ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" -S vcodec:h264 --windows-filenames --restrict-filenames --write-auto-subs --sub-lang "en.*" --embed-subs --add-metadata --add-chapters --no-playlist -N 4 -ci --verbose --remux-video "mp4/mkv"' | |
ZSH_THEME="amuse" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias dkrup="docker-compose up --build" | |
alias dkrdown="docker-compose down --rmi local --remove-orphans" | |
alias dkrlogs="docker-compose logs" | |
alias dkrprune="docker system prune --all --force --volumes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule ExMachinaHelper do | |
@doc """ | |
Converts all characters in the given string to a random case according to `:default` mode. | |
Useful for writing tests where sorting is of importance. | |
## Examples | |
iex> ExMachinaHelper.random_case("abcdef") | |
"AbCdEf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
brew install postgresql | |
brew services start postgresql | |
createdb `whoami` | |
# https://stackoverflow.com/questions/15301826/psql-fatal-role-postgres-does-not-exist | |
psql # to test login works | |
createuser -s postgres | |
psql -U postgres # to test login works |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias mxclean="rm -rf deps _build .elixir_ls assets/node_modules" | |
alias mxcompile="mix do deps.get, format, compile" | |
alias mxcredo="mix credo --strict" | |
alias mxdepsclean="mix deps.clean --unused --unlock" | |
alias mxectoreset="mix ecto.drop && sleep 3 && mix ecto.reset" | |
alias mxectomigrate="mix ecto.migrate" | |
alias mxgraph="mix xref graph --format dot && dot -Tpng xref_graph.dot -o xref_graph.png" | |
alias mxhexoutdated="mix hex.outdated --all | grep -ve 'Up-to-date' -e 'not possible'" | |
alias mxiex="iex -S mix" | |
alias mxlocals="mix local.hex --force && mix local.rebar --force" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias gtahead="git pull origin $(git rev-parse --abbrev-ref HEAD)" | |
alias gtczechmain="git checkout main" | |
alias gtdeleteall='git branch | grep -v "main" | xargs git branch -D' | |
alias gtfetch="git fetch -p && git gc" | |
alias gtlog="git log --oneline" | |
alias gtmessedup="git fetch origin && git reset --hard origin/main && git clean -xfd" | |
alias gtprune="git remote prune origin" | |
alias gtstash="git stash --include-untracked" |