Max Penet mpenet

View gist:9185061
1 2 3 4 5 6 7
/(((?:[^A-Za-z0-9@@$##￾￿‪-‮]|^))((https?:\/\/)?((?:(?:(?:[^/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$// …  ᠎

    -
 - //￾￿‪-‮/](?:[_-]|[^/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$// …  ᠎

    -
 - //￾￿‪-‮/])*)?[^/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$// …  ᠎

    -
 - //￾￿‪-‮/]\.)*(?:(?:[^/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$// …  ᠎

    -
 - //￾￿‪-‮/](?:-|[^/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$// …  ᠎

    -
 - //￾￿‪-‮/])*)?[^/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$// …  ᠎

    -
 - //￾￿‪-‮/]\.)(?:(?:(?:aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|xxx)(?=[^0-9a-zA-Z@]|$))|(?:(?:ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx
View gist:8912003

On the evilness of the clojure array-map and why you should avoid relying on its ordering:

user> (reduce #(assoc %1 %2 %2) (array-map) (range 10))
{0 0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 6, 7 7, 8 8, 9 9}

user> (reduce #(assoc %1 %2 %2) (array-map) (range 30))
{0 0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 6, 7 7, 8 8, 9 9, 10 10, 11 11, 12 12, 13 13, 14 14, 15 15, 16 16, 17 17, 18 18, 19 19
, 20 20, 21 21, 22 22, 23 23, 24 24, 25 25, 26 26, 27 27, 28 28, 29 29}
View gist:8904183
1 2 3
linux-headers-3.12.6-031206-generic_3.12.6-031206.201312201218_amd64.deb
linux-headers-3.12.6-031206_3.12.6-031206.201312201218_all.deb
linux-image-3.12.6-031206-generic_3.12.6-031206.201312201218_amd64.deb
View gist:5793357
View gist:5560708
1 2 3 4 5 6 7 8
;; example of query that takes results by pairs,
;; and uses the last value of x to create the new chunks, incrementing its value.
 
(lazy-query (select :items
(limit 2)
(where {:x 1}))
(fn [query coll]
(merge query (where {:x (-> coll last :x inc)}))))
View gist:5421208
1 2 3 4 5 6 7 8 9 10
a
a's
able
about
above
according
accordingly
across
actually
after
View gist:5420906
1 2 3
(extend-type js/NodeList
Seqable
(-seq [array] (array-seq array 0)))
View gist:5358210
1 2 3 4 5 6 7 8 9
(defn x->sha1
[x]
(->> (.getBytes (pr-str x))
(.digest (java.security.MessageDigest/getInstance "SHA1"))
(#(apply str (map (fn [i] (format "%02x" (bit-and i 0xff))) %)))))
 
(prn (x->sha1 {:a 2}))
 
"0be74d5e229441849c6c1e4a5e4b80c4c7b84312"
View gist:5224355
1 2 3 4 5 6 7 8 9 10
 
(defmacro has
([p k v]
`(.has ^GremlinPipeline ~p ~(name k) ~v))
([p k c v]
`(.has ^GremlinPipeline ~p ~(name k)
(convert-symbol-to-compare '~c)
~v)))
 
(defmacro has-not
View gist:5185981
1 2 3 4 5 6 7 8 9 10
/**
* <p>Represents a point on the surface of a sphere. (The Earth is almost
* spherical.)</p>
*
* <p>To create an instance, call one of the static methods fromDegrees() or
* fromRadians().</p>
*
* <p>This code was originally published at
* <a href="http://JanMatuschek.de/LatitudeLongitudeBoundingCoordinates#Java">
* http://JanMatuschek.de/LatitudeLongitudeBoundingCoordinates#Java</a>.</p>
Something went wrong with that request. Please try again.