A CLI tool that reads JSON from stdin then writes it to stdout in EDN format.
➜ clojure -A:native-image
(defn in? | |
"Evaluate true if collection contains element." | |
[coll elem] | |
(some #(= elem %) coll)) | |
(defn str->int | |
"Transform string with number into vector of ints." | |
[nif-vector] | |
(mapv #(Integer/parseInt %) (map str nif-vector))) |
stages: | |
- review | |
- cleanup | |
variables: | |
# The Platform.sh project ID. | |
PF_PROJECT_ID: abcdefg123456 | |
push-platformsh: | |
# This Docker image installs the Platform.sh CLI (and PHP, Git and SSH). |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
Live demos:
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
(use 'prc) | |
;;; ----- Bar chart ----- | |
(defn roll-die [num-sides] | |
(inc (rand-int num-sides))) | |
(defn roll-dice [num-sides num-dice] | |
(->> (repeatedly num-dice #(roll-die num-sides)) | |
(reduce +))) |
{ | |
"AWSEBDockerrunVersion": "1", | |
"Image": { | |
"Name": "<AWS_ACCOUNT_ID>.dkr.ecr.us-east-1.amazonaws.com/<NAME>:<TAG>", | |
"Update": "true" | |
}, | |
"Ports": [ | |
{ | |
"ContainerPort": "443" | |
} |
This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.
The Atom documentation is excellent. It's highly worth reading the flight manual.