A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
(* sorted : int list -> bool | |
* check if a list of ints is sorted *) | |
fun sorted [] = true | |
| sorted [x] = true | |
| sorted (x::y::xs) = x < y andalso sorted (y::xs) | |
val sorted_test1 = sorted [1,2,3] | |
val sorted_test2 = not (sorted [2,1,3]) | |
val sorted_test3 = not (sorted [2,3,1]) | |
val sorted_test4 = sorted [] |
#/bin/bash | |
#-- Script to automate https://help.github.com/articles/why-is-git-always-asking-for-my-password | |
REPO_URL=`git remote -v | grep -m1 '^origin' | sed -Ene's#.*(https://[^[:space:]]*).*#\1#p'` | |
if [ -z "$REPO_URL" ]; then | |
echo "-- ERROR: Could not identify Repo url." | |
echo " It is possible this repo is already using SSH instead of HTTPS." | |
exit | |
fi |