View cache.clj
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
;; There is a subtle problem with the official clojure.core.cache | |
;; example (https://github.com/clojure/core.cache/wiki/Using): | |
(defn get-data [key] | |
(cache/lookup (swap! cache-store | |
#(if (cache/has? % key) | |
(cache/hit % key) | |
(cache/miss % key (retrieve-data key)))) | |
key)) |
View git-multi-status.sh
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/bash | |
# usage: $0 source_dir [source_dir] ... | |
# where source_dir args are directories containing git repositories | |
red="\033[00;31m" | |
green="\033[00;32m" | |
yellow="\033[00;33m" | |
blue="\033[00;34m" | |
purple="\033[00;35m" |
View fancy-prompt.sh
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 _fancy_prompt { | |
local RED="\[\033[01;31m\]" | |
local GREEN="\[\033[01;32m\]" | |
local YELLOW="\[\033[01;33m\]" | |
local BLUE="\[\033[01;34m\]" | |
local WHITE="\[\033[00m\]" | |
local PROMPT="" | |
# Working directory |