Skip to content

Instantly share code, notes, and snippets.


Enzzo souenzzo

Block or report user

Report or block souenzzo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
borkdude / js_parser.clj
Last active Sep 7, 2019
Parse JavaScript in Clojure using the Google Closure Compiler
View js_parser.clj
"exec" "clojure" "-Sdeps" "{:deps {org.clojure/clojurescript {:mvn/version \"1.10.520\"}}}" "$0" "$@"
;; running js_parser.clj "function foo(x) { var y = x + 1; }" will print:
;; [{:type :function, :name "foo", :body [{:variable-statement [{:lvalue "y", :initializer {:type :binary-op, :left "x", :operator "+", :right "1"}}]}], :params ["x"]}]
View error
Error building classpath. Failed to read artifact descriptor for com.datomic:ion:jar:0.9.28
org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.datomic:ion:jar:0.9.28
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.readArtifactDescriptor(
at clojure.lang.MultiFn.invoke(
kennyjwilli /
Last active Nov 9, 2018
Delete leftover Datomic resources

Delete Leftover Datomic Cloud Resources

If you delete a Datomic Cloud system, it will leave some resources in AWS. To entirely delete all resources created by Datomic Cloud, you must follow these steps. Because we love automation, this script performs all these steps for you so you don't need to navigate the AWS Console UI.


gfredericks / frobnicate.clj
Last active Mar 1, 2019
Self-contained clojure file with deps
View frobnicate.clj
#!/usr/bin/env bash
#! top-of-file comments can be written using more #! lines, which
#! is a valid comment in both clojure and bash
":";# alternately this works too
#! The construction below uses cross-language syntactic hackery to
#! specify the -Sdeps arg in a part of the file that's interpreted
#! by clojure as clojure syntax (i.e., not a line comment), so it
mfikes /
Last active Mar 6, 2019
Testing perf of GraalVM version of Google Closure Compiler for ClojureScript cljs.core
git clone
cd clojurescript

Ctrl-C when it logs

Applying optimizations :advanced to 344 sources
mhuebert /
Last active Oct 2, 2019
material-ui's CSS-in-JS with Reagent. (see

material-ui allows for customizing CSS via a higher-order component called withStyles. Like many higher-order components which expect render props, the purpose of withStyles is to accept some parameters, and then introduce a new variable into the scope of the component tree.

One succinct and simple way to translate the concept of scope into Clojure is via a custom let macro. Usage of such a macro is demonstrated here:

(:require [material-ui.styles :as m])

(m/let [{:keys [leftPad]} {:leftPad 
                           {:paddingLeft 8}}]
  ;; `leftPad` is now the _className_ associated with {:paddingLeft 8}                             
athos / deps.edn
Last active Oct 17, 2019
Try `clojure -Sdeps '{:deps {hello-clojure {:git/url "" :sha "1c9a05106171f97f9b8e8ac8f58c7bd8dbe021f9"}}}' -m hello-clojure` on your terminal
View deps.edn
{:paths ["."]
:deps {clansi {:mvn/version "1.0.0"}}}
iperdomo / maps.cljs
Last active Jan 11, 2018
Google Maps delete vertex sample in ClojureScript
View maps.cljs
;; New implementaion based on comments by Andre Rauh (@rauh) in #clojurescript on
(defn delete-vertex-menu
(this-as this
gdeer81 / spec-coercion.clj
Last active Jan 23, 2017 — forked from Deraen/spec-coercion.clj
Clojure.spec coercion test
View spec-coercion.clj
(ns spec-test.core
(:require [clojure.spec :as s]))
(defn x-integer? [x]
(if (integer? x)
(if (string? x)
(Integer/parseInt x)
(catch Exception e
halgari / gist:f431b2d1094e4ec1e933969969489854
Last active Aug 29, 2019
What I want from a Type System
View gist:f431b2d1094e4ec1e933969969489854
The question was asked why I (as a programmer who prefers dynamic languages) don't consider static types "worth it". Here
is a short list of what I would need from a type system for it to be truely useful to me:
1) Full type inference. I would really prefer to be able to write:
(defn concat-names [person]
(assoc person :full-name (str (:first-name person)
(:second-name person))))
And have the compiler know that whatever type required and produced from this function was acceptible as long as the
You can’t perform that action at this time.