- High level overview https://yogthos.github.io/ClojureDistilled.html
- An Animated Introduction to Clojure https://markm208.github.io/cljbook/
- Interactive tutorial in a browser https://tryclojure.org/
- Interactive exercises http://clojurescriptkoans.com/
- Clerk notebooks with introductory examples https://github.clerk.garden/anthonygalea/notes-on-clojure
- More interactive exercises https://4clojure.oxal.org/
- Lambda Island tutorials https://lambdaisland.com/
- Functional Programming with Clojure resources https://practicalli.github.io/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clojure.polling | |
(:require [clj-http.client :as client] | |
[clojure.core.async :as async :refer [>!! timeout <! go-loop]] | |
[cheshire.core :as json] | |
[clojure.tools.logging :as log])) | |
(defn client | |
([endpoint] | |
(client/get endpoint)) | |
([endpoint c e] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright Fauna, Inc. | |
# SPDX-License-Identifier: MIT-0 | |
version: "3.9" | |
services: | |
fauna: | |
image: fauna/faunadb:latest | |
ports: | |
- "8443:8443" | |
- "8444:8444" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HasRole - User-Defined Function | |
CreateFunction({ | |
name: 'HasRole', | |
body: Query(Lambda(['role', 'ref'], Select(Var('role'), Call('RolesMemberships', [Var('ref')]), false))) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This is free and unencumbered software released into the public domain. | |
* | |
* For more information, please refer to <https://unlicense.org> | |
*/ | |
//Regular text | |
#define BLK "\e[0;30m" | |
#define RED "\e[0;31m" | |
#define GRN "\e[0;32m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ServiceProvider { | |
constructor(services) { | |
this._services = services; | |
// use proxy to create a "magic getter" that will search the _services for a matching name | |
// then call "_makeOnce" to instantiate or return the singleton | |
return new Proxy(this, { | |
get: (provider, service) => { | |
service = service.charAt(0).toUpperCase() + service.slice(1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Redirect output to stderr. | |
exec 1>&2 | |
# enable user input | |
exec < /dev/tty | |
consoleregexp='console.log' | |
# CHECK | |
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0 | |
then |