Skip to content

Instantly share code, notes, and snippets.

hugoduncan / primitive_predicate.clj
Created April 11, 2021 13:30
Predicate for testing whether a value is primitive in clojure
(definterface IPrimitive
(is_primitive [^boolean x])
(is_primitive [^float x])
(is_primitive [^double x])
(is_primitive [^int x])
(is_primitive [^long x])
(is_primitive [^Object x]))
(deftype IsPrimitive []

Keybase proof

I hereby claim:

  • I am hugoduncan on github.
  • I am hugoduncan ( on keybase.
  • I have a public key ASDseSq5a9GjSqrnIsEMf3Ga_qvOzbvm9uamhZD2yQ3nCgo

To claim this, I am signing this object:

Verifying my Blockstack ID is secured with the address 1MRCNmVgM2t3mryyaknMZagM9Rxdvs1v6K
hugoduncan / list_view.clj
Last active February 7, 2016 04:03
Using a React Native ListView with
{:dataSource (clone-with-rows
(mapv #(assoc % :omcljs$meta (pr-str (meta %)))
:renderRow (fn objects-render-r-row [row section-id row-id]
(let [row (j->c row)
m (:omcljs$meta row)
m (if m (reader/read-string m))
hugoduncan / core-docker.service
Last active August 29, 2015 14:06
Fleet services for switching to latest docker on CoreOS, and back again
# core-docker.service
# Fleet global unit to restore docker to the CoreOS version
ExecStart=/usr/bin/rm -f /run/systemd/system/docker.service.d/10-start.conf
<appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender">
<appender name="FILE-${target}" class="ch.qos.logback.core.FileAppender">
{:namespaces ({:vars ({:ns hyde-pallet-crate.core,
:name build-site,
:file "hyde_pallet_crate/core.clj",
:column 1,
:line 61,
:var-type :fn,
:arglists ([root jekyll-config site-config])}
{:ns hyde-pallet-crate.core,
:name site-config,
:file "hyde_pallet_crate/core.clj",
{:namespaces ({:vars ({:ns palletops.hyde,
:name gemfile,
:file "palletops/hyde.clj",
:column 1,
:line 65,
:var-type :fn,
:arglists ([config])}
{:ns palletops.hyde,
:name clean-target,
:file "palletops/hyde.clj", Connection reset 196 122
sun.reflect.NativeMethodAccessorImpl.invoke 57 43
java.lang.reflect.Method.invoke 606
clojure.lang.Reflector.invokeMatchingMethod 93
clojure.lang.Reflector.invokeInstanceMethod 28
{:results ({:type :pass, :selector :amzn-linux-2013-092, :service :pallet-ec2, :feature ("default-settings" "install maven")}), :date "20140410T213008.035Z", :untested (:ubuntu-10-04 :ubuntu-12-04 :ubuntu-13-04 :ubuntu-13-10 :centos-6-5 :debian-7-4 :debian-6-0)}