This file contains hidden or 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
withResource pool (\_ -> do | |
logError "gave a resource" | |
pass | |
logError "took back the resource" | |
) |
This file contains hidden or 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
withResourceSnap :: Pool a -> (a -> Handler b v c) -> Handler b v c | |
withResourceSnap pool act = bracketHandler (takeResource pool) putResource' runAction | |
where runAction (a,b) = act a | |
putResource' (a,b) = putResource b a |
This file contains hidden or 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
class Responder a where | |
respond :: a -> Controller () | |
class Injectable a where | |
inject :: Controller (Maybe a) | |
instance (Injectable a, Responder b) => Responder (a -> b) where | |
respond f = do | |
a <- inject | |
case a of |
This file contains hidden or 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
ExUnit.start | |
defmodule MacroExpansionTest do | |
use ExUnit.Case | |
defmacro a_macro(_) do | |
quote do | |
1 + 1 | |
end | |
end |
This file contains hidden or 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
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 | |
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. |
This file contains hidden or 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
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 |
This file contains hidden or 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
# 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 |
This file contains hidden or 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
# ----------------------------- | |
# 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 |
This file contains hidden or 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
; 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 |
This file contains hidden or 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
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 |