Skip to content

Instantly share code, notes, and snippets.

View jtjames's full-sized avatar

jtjames jtjames

  • Tasetic Wave, LLC
  • Philadelphia
View GitHub Profile
@danverbraganza
danverbraganza / .emacs
Last active October 4, 2015 11:37
My personal .emacs file for convenience.
(when (load "flymake" t)
(defun flymake-pyflakes-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
'flymake-create-temp-inplace))
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
(list "pyflakes" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
@tcoupland
tcoupland / compojureHandler2.clj
Created April 28, 2012 11:02
Simple compojure handler with logging middleware
(ns compojur-learning.core
(:use compojure.core))
(defroutes handler
(GET "/" [] (println "middle") {:status 200}))
(defn logging [chain] (fn [req] (
(println "before")
(chain req)
(println "after"))))
@andyhd
andyhd / maybe-monad.js
Created January 16, 2012 01:02
Maybe monad in Javascript
function maybe(value) {
var obj = null;
function isEmpty() { return value === undefined || value === null }
function nonEmpty() { return !isEmpty() }
obj = {
map: function (f) { return isEmpty() ? obj : maybe(f(value)) },
getOrElse: function (n) { return isEmpty() ? n : value },
isEmpty: isEmpty,
nonEmpty: nonEmpty
}
@millermedeiros
millermedeiros / .vimrc
Last active March 20, 2025 08:53
My VIM settings (.vimrc)
" =============================================================================
" Miller Medeiros .vimrc file
" -----------------------------------------------------------------------------
" heavily inspired by: @factorylabs, @scrooloose, @nvie, @gf3, @bit-theory, ...
" =============================================================================
" -----------------------------------------------------------------------------
" BEHAVIOR