Skip to content

Instantly share code, notes, and snippets.

View christianromney's full-sized avatar
🏠
Working from home

Christian Romney christianromney

🏠
Working from home
View GitHub Profile

Recent improvements to the ClojureScript compiler have greatly simplified setting up development versus production outputs.

This example uses Figwheel as something that you want to exclude for production, but the pattern is general.

With this simple setup you only need one html file/view and it will work for developement and production.

;; Export
(setq org-html-validation-link nil)
(setq org-export-html-postamble nil)
;; File handling
(setq org-directory "~/Documents/notes")
(setq org-default-notes-file (concat org-directory "/default.org"))
(setq org-log-done 'time)
;; TODO
(defn recursive-take
"Recursively take from a list based on the operation list
For example [:h :l :l :h] will take using the following operations
until the list is exhausted: first last last first."
[col operations]
(loop [c col ops (cycle operations) acc []]
(if (empty? c)
acc
(let [op (first ops)
[head-fn tail-fn] (if (= op :h)

Clojure does Objects Better

A hopefully short and concise explanation as to how Clojure deals with Objects. If you already write Clojure, this isn't for you.

You know what an Interface is if you write/read Java or PHP 5+. In Clojure it might be called defprotocol.

user> (defprotocol IABC
        (also-oo [this])
        (another-fn [this x]))

IABC

Keybase proof

I hereby claim:

  • I am christianromney on github.
  • I am christianromney (https://keybase.io/christianromney) on keybase.
  • I have a public key whose fingerprint is 1A2D 2EE2 4C25 03FD 7D2F CDF6 111F 9EEB 195F 184E

To claim this, I am signing this object:

@christianromney
christianromney / LDHkw.markdown
Created April 9, 2014 16:46
A Pen by Christian Romney.
@christianromney
christianromney / my-brews.txt
Created February 28, 2014 22:29
Tools I find useful
ack # search
ansible # config mgmt
apachetop # how's apache
apple-gcc42 # helps to build certain software
aria2 # faster downloads
asciidoc # documentation
aspell # for emacs/vim spell-checking
bazaar # every now and then I clone a repo hosted by ubuntu
brew-desc # get better descriptions of homebrew utils
casperjs # javascript testing and screenscraping
;; Geiser settings
(setq geiser-active-implementations '(racket))
(setq geiser-repl-startup-time 10000)
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history")
(setq geiser-repl-query-on-kill-p nil)
(setq geiser-implementations-alist
'(((regexp "\\.scm$") racket)
((regexp "\\.ss$") racket)
((regexp "\\.rkt$") racket)))
;; Geiser settings
(setq geiser-active-implementations '(racket))
(setq geiser-repl-startup-time 10000)
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history")
(setq geiser-repl-query-on-kill-p nil)
(setq geiser-implementations-alist
'(((regexp "\\.scm$") racket)
((regexp "\\.ss$") racket)
((regexp "\\.rkt$") racket)))