Skip to content

Instantly share code, notes, and snippets.

View ponzao's full-sized avatar

Vesa Marttila ponzao

  • Helsinki, Finland
View GitHub Profile
{:starters
(["Marcus" 17]
["Baba" 16]
["Sami" 14]
["Tuomas" 14]
["Kabu" 14]
["Jesse" 11]
["Lydä" 9]
["Jonde" 9]
["Jebu" 9]
(defn merge-with-key
[f & maps]
(when (some identity maps)
(reduce (fn [acc x]
(reduce (fn [m [k v]]
(if (contains? m k)
(assoc m k (f k (get m k) v))
(assoc m k v)))
acc
x))
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#rc()
Plugin 'gmarik/Vundle.vim'
Bundle 'tpope/vim-classpath'
Bundle 'tpope/vim-leiningen'
Bundle 'tpope/vim-projectionist'
@ponzao
ponzao / vice.clj
Created September 26, 2016 16:35
Clojure Spec coercion nonsense
(ns vice
(:require [clojure.spec :as s]
[clj-time.core :as t]
[clj-time.format :as tf])
(:import [org.joda.time DateMidnight DateTime]
[java.util UUID]
[clojure.lang Keyword]
[java.math BigInteger]
[java.net URL URI]
[java.util.regex Pattern]))
(def numbers
[[" - "
"| |"
" "
"| |"
" - "]
[" "
" |"
" "