Skip to content

Instantly share code, notes, and snippets.

View jonathan's full-sized avatar

Jonathan Hicks jonathan

View GitHub Profile
function mvim() {
if [ -d "$1" ]; then
local dir=$(printf %q "$1")
command mvim --cmd ":cd $dir" "$@"
else
command mvim "$@"
fi
}
@jeresig
jeresig / .vimrc
Created May 4, 2011 16:46
VIM Config
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
set nocompatible
set autoindent
set tabstop=2
set showmatch
set vb t_vb=
set ruler
set nohls
set incsearch
syntax on
@swannodette
swannodette / spec.cljs
Last active March 5, 2018 23:24
om.next query spec
(ns om.next.spec
(:require [cljs.spec :as s]))
(s/def ::ident (s/and vector? (s/cat :ident keyword? :value #(not (coll? %)))))
(s/def ::join-key (s/or :prop keyword? :ident ::ident))
(s/def ::join (s/and (s/map-of ::join-key ::query) #(= (count %) 1)))
(s/def ::union (s/and (s/map-of keyword? ::query) #(> (count %) 1)))
(s/def ::param-expr
(s/cat :query-expr ::query-expr
(ns om.next.spec
(:require [cljs.spec :as s]
[clojure.test.check :as tc]
[clojure.test.check.properties :as tcp]))
(s/def ::statics
(s/cat
:static '#{static}
:protocol-name '#{om.next/Ident om.next/IQuery om.next/IQueryParams}
:impls (s/* seq?)))