Skip to content

Instantly share code, notes, and snippets.

View Raynes's full-sized avatar

Anthony Grimes Raynes

View GitHub Profile
(letfn [(status-map [status] {:status status :body [0]})]
(tabular
(fact
(safe-parse {:status ?status :body "[0]"}) => (contains ?expected))
?status ?expected
404 (status-map 404)
400 (status-map 400)
422 (status-map 422)
500 (status-map 500)
204 (status-map 204)
(ns tentacles.core-test
(:use midje.sweet
tentacles.core))
(fact
(query-map {:foo 0
:foo-bar 0
"baz-quux" 0}) => (contains {"foo" 0 "foo_bar" 0 "bar_quux" 0}))
68-245-171-115:~ anthony$ lein new template foo
Generating skeleton 'lein new' template project.
68-245-171-115:~ anthony$ cd foo
68-245-171-115:foo anthony$ lein new foo bar
68-245-171-115:foo anthony$ ls bar/
src
<cemerick> ah, "accordion" is what I was trying to think of…
http://jqueryui.com/demos/accordion/ [10:44]
*** ccorn (~ccorn@84-53-64-50.adsl.unet.nl) has quit: Quit: ccorn
<cemerick> s/selection panels/accordion
<Raynes> Foldable!
<Raynes> That would be great and would fit in marginalia fine, wouldn't it?
[10:45]
<Raynes> Only see what you want to see.
<Raynes> I love you so much, Chas.
<cemerick> There are tradeoffs.
;; ERC
(require 'znc)
(global-set-key (kbd "C-c z") 'znc-all)
(defun get-string-from-file (filePath)
"Return FILEPATH's file content."
(with-temp-buffer
(insert-file-contents filePath)
(buffer-string)))
(require 'color-theme)
(require 'color-theme-tango)
(color-theme-tango)
(defun current-itunes-song ()
(do-applescript
"tell application \"iTunes\"
set artist_name to the artist of the current track
set song_title to the name of the current track
set song_album to the album of the current track
set song_length to the time of the current track
set played_count to the played count of the current track
return song_title & \" - \" & artist_name & \" [\" & song_album & \"] [length: \" & song_length & \"] [played: \" & played_count & \"]\"
end tell"))
<Raynes> TeXnomancy: FYI, I blame you for the fact that I got almost no work
done on my book today because I was too busy mucking with ERC.
[18:33]
<Raynes> And when I miss my deadline on the 5th for this next chapter, I'll
cite you as my reason. [18:34]
<TeXnomancy> can't pin that one on me; it's your fault for not having switched
sooner [18:41]
*** cemerick (~cemerick@c-75-69-119-42.hsd1.ma.comcast.net) has joined channel
#leiningen
<Raynes> TeXnomancy: I like how you avoided saying "it's your fault for
*** Is online: dom96 [16:52]