Skip to content

Instantly share code, notes, and snippets.

View j1n3l0's full-sized avatar

Nelo Onyiah j1n3l0

  • Goznel Limited
  • Kent UK
  • 03:59 (UTC -12:00)
View GitHub Profile
@lancew
lancew / gist:4001624
Created November 2, 2012 14:19
xmonad natural scrolling
echo "pointer = 1 2 3 5 4 7 6 8 9 10 11 12" > ~/.Xmodmap && xmodmap ~/.Xmodmap
@j1n3l0
j1n3l0 / gist:2239353
Created March 29, 2012 16:25
loving lein2 dynamic dependencies :) #clojure #lein2 #pomegranate #quil
$ lein2 repl
Welcome to REPL-y!
Clojure 1.3.0
user=> (use '[cemerick.pomegranate :only (add-dependencies)])
nil
user=> (add-dependencies :coordinates '[[quil "1.0.0-SNAPSHOT"]])
ArtifactNotFoundException Could not find artifact quil:quil:jar:1.0.0-SNAPSHOT in central (http://repo1.maven.org/maven2/) org.sonatype.aether.connector.wagon.WagonRepositoryConnector$4.wrap (WagonRepositoryConnector.java:946)
user=> (add-dependencies :coordinates '[[quil "1.0.0-SNAPSHOT"]] :repositories (merge cemerick.pomegranate.aether/maven-central {"clojars" "http://clojars.org/repo"}))
(defn parse-flags
"Parse a list of flags. Each flag name must be a keyword, and the
value must not be a keyword. If the value is omitted, true is
assumed. Returns a map.
e.g. (parse-flags [:i :j 1 :k \"two\"])
=> {:i true, :j 1, :k \"two\"}"
[flags]
(loop [flags (seq flags) accum {}]
(if flags
@ray1729
ray1729 / gist:896702
Created March 31, 2011 16:30
Possible Regexp::Common API for Clojure
;; Perl: $RE{num}{-base => 2}{real}{-group => 3}{-sep => ','}
(re-seq (re :real {:base 2 :group 3 :sep \,} ) "1.345")