Skip to content

Instantly share code, notes, and snippets.

(defn sorted-set-on [mapper & elems]
(sorted-set-by #(compare (mapper %1) (mapper %2)) elems))
(defn- merge-entry [mapper m e]
(let [k (key e) v (val e)]
(if (contains? m k)
(assoc m k ((safe-get mapper k) (get m k) v))
(assoc m k v))))
(defn merge-with-mapper
"Returns a map that consists of the rest of the maps conj-ed onto
the first. If a key occurs in more that one map, the mapping(s)
from the latter (left-to-right) will be combined with the mapping in
port "6600"
music_directory "~/Music/music"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/mpd.db"
log_file "~/.mpd/mpd.log"
state_file "~/.mpd/mpd.state"
volume_normalization "yes"
audio_output {
type "osx"
#!/usr/bin/ruby
#
# This file is generated code. DO NOT send patches for it.
#
# Original source files with comments are at:
# https://github.com/defunkt/hub
#
module Hub
Version = VERSION = '1.10.5'
sudo rm -rf /Library/Frameworks/GHC.framework
sudo rm -rf /Library/Frameworks/HaskellPlatform.framework
sudo rm -rf /Library/Haskell
rm -rf .cabal
rm -rf .ghc
rm -rf ~/Library/Haskell
find /usr/bin /usr/local/bin -type l | \
xargs -If sh -c '/bin/echo -n f /; readlink f' | \
egrep '//Library/(Haskell|Frameworks/(GHC|HaskellPlatform).framework)' | \
cut -f 1 -d ' ' > /tmp/hs-bin-links
; fails
(defn calls-callback [callback]
(fn [thing] (callback thing)))
(defn callback [a] (print a))
(fact "calls-callback can be mocked to check the callback is called"
(let [closed (calls-callback callback)]
(closed 1) => anything
# -----------------------------
# PostgreSQL configuration file
# -----------------------------
#
# This file consists of lines of the form:
#
# name = value
#
# (The "=" is optional.) Whitespace may be used. Comments are introduced with
# "#" anywhere on a line. The complete list of parameter names and allowed
# kern.sysv.shm* settings added by MagLev installation
kern.sysv.shmmax=2147483648
kern.sysv.shmall=524288
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
set nocompatible
filetype off
silent! call pathogen#runtime_append_all_bundles()
silent! call pathogen#helptags()
filetype plugin indent on
runtime macros/matchit.vim
set hidden
set autoread
set nobackup
beepity-boo-bop:code $ cd ../../
beepity-boo-bop:src $ cd ..
beepity-boo-bop:Downloads $ open disruptor-master.zip
beepity-boo-bop:Downloads $ cd disruptor-master/
beepity-boo-bop:disruptor-master $ ./gradlew tasks
Downloading http://services.gradle.org/distributions/gradle-1.2-bin.zip
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................