diff --git a/bin/measure-compile-time b/bin/measure-compile-time new file mode 100755 index 0000000..0c0fbc3 --- /dev/null +++ b/bin/measure-compile-time @@ -0,0 +1,33 @@ +#! /bin/sh +if [ $# -eq 0 ] + then + MAIN="src/Main.elm"; + else + MAIN=$1; +fi +set -e pipefail; +# only output seconds +# clear cache +# recurse tree if no arg is given +echo measuring $MAIN +rm -rf elm-stuff +C=$(git rev-parse HEAD) +alias compile='elm make $MAIN --output=node_modules/compile-output.html' +alias compilesilent='compile >/dev/null' +T=`(time (compilesilent)) 2>&1 || compile` +if [ $# -eq 0 ] + then + echo $C $MAIN $T >> ~/compile-times-per-commit +fi +if [ $# -eq 1 ] + then + echo $C $MAIN $T >> ~/compile-times-per-file +fi +echo measured $C $MAIN $T + +# recurse tree if no arg is given +if [ $# -eq 0 ] + then + git checkout - -q + measure-compile-time +fi diff --git a/gitconfig b/gitconfig index 12c9f2a..a2b00e3 100644 --- a/gitconfig +++ b/gitconfig @@ -16,3 +16,5 @@ [mergetool "sourcetree"] cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\" trustExitCode = true +[pull] + rebase = true diff --git a/zshrc b/zshrc index 0c66c68..1d73313 100644 --- a/zshrc +++ b/zshrc @@ -1,3 +1,5 @@ +# Fig pre block. Keep at the top of this file. +. "$HOME/.fig/shell/zshrc.pre.zsh" # If you come from bash you might have to change your $PATH. @@ -226,7 +228,6 @@ export PATH="/opt/homebrew/bin:$PATH" export FPATH="/usr/local/share/zsh/functions:$FPATH" -export PATH="/Users/janwirthprivate/compiler/dist-newstyle/build/aarch64-osx/ghc-8.10.7/elm-0.19.1/x/elm/opt/build/elm:$PATH" -export PATH="/Users/janwirth/bin:$PATH" alias z='fasd_cd -d' - +source $HOME/.cargo/env +export PATH="/Users/$HOME/dotfiles/bin:$PATH"