Skip to content

Instantly share code, notes, and snippets.

Matt Briggs mbriggs

Block or report user

Report or block mbriggs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:998d21a8de8719229e2b

Probably needs to be seed tables

View gist.vim
let g:gist_clip_command = 'pbcopy'
let g:gist_detect_filetype = 1
mbriggs / anonymous-gist.clj
Created Sep 18, 2014
websockets with core.async and http-kit
View anonymous-gist.clj
(defn build-routes
[{:keys [bus queues] :as app-data}]
(GET "/data" req
; get an http-kit websocket channel for this request
(http/with-channel req req-ch
; make a channel for subscriptions to the data updated event bus
(let [metrics (async/chan)]
; subscribed to all messages in the updated topic
(async/sub bus :updated metrics)
View anonymous-gist.clj
(defn- deref2 [_ p] @p)
(defn gather!
[{:keys [queues]}]
(send queues deref2 (rabbit/get-queues)))

Keybase proof

I hereby claim:

  • I am mbriggs on github.
  • I am mbriggs ( on keybase.
  • I have a public key whose fingerprint is 9EF3 F6C7 DE1D C5CB 27E5 A8F9 625A B952 57A9 1190

To claim this, I am signing this object:

View anonymous-gist.clj
(defn home-path
"create a path from the home dir"
(str (System/getProperty "user.home") s))
mbriggs / anonymous-gist.el
Created Apr 4, 2014
switch to project dir
View anonymous-gist.el
(defun switch-to-local-project ()
(let* ((prompt "Switch to project: ")
(project-dir "~/src")
(choices (actionable-files-in-directory project-dir))
(project (ido-completing-read prompt choices nil t)))
(find-file (concat project-dir "/" project))))
(defun actionable-files-in-directory (dir)
mbriggs / install-graphite
Created Apr 3, 2014
install graphite on mavericks
View install-graphite
#!/usr/bin/env bash
# download and install xquartz
# so deps
brew install cairo memcached
View anonymous-gist.el
(global-set-key (kbd "<f1>") 'magit-status)
(define-key evil-normal-state-map "B" 'magit-checkout)
mbriggs /
Created Mar 25, 2014
Simple class abstraction in js

Simple js class abstraction

Basically it is backbones self-propegating extend method, slightly hacked up to allow the definition of __name__. Defining this means that you will never end up seeing child when looking at your class in the dev tools. Also adds a define method for creating singletons.

You can’t perform that action at this time.