Skip to content

Instantly share code, notes, and snippets.

View eval's full-sized avatar
💭
ƛ

Gert Goet eval

💭
ƛ
View GitHub Profile
@ssrihari
ssrihari / clojure-learning-list.md
Last active April 17, 2025 15:56
An opinionated list of excellent Clojure learning materials

An opinionated list of excellent Clojure learning materials

These resources (articles, books, and videos) are useful when you're starting to learn the language, or when you're learning a specific part of the language. This an opinionated list, no doubt. I've compiled this list from writing and teaching Clojure over the last 10 years.

  • 🔴 Mandatory (for both beginners and intermediates)
  • 🟩 For beginners
  • 🟨 For intermediates

Table of contents

  1. Getting into the language
@dustingetz
dustingetz / a.md
Last active October 4, 2022 15:47
HOWTO install `#uri` reader extension in Clojure/Script
@simonw
simonw / README.md
Created May 3, 2022 18:11
Simple declarative schema migration for SQLite
@borkdude
borkdude / inc_number.joyride.cljs
Last active May 11, 2022 20:23
Increment number on line in joyride
(require '["vscode" :as vscode]
'[clojure.string :as str])
(defn insert-num
[]
(let [editor vscode/window.activeTextEditor
position (.-active (.-selection editor))
doc (.-document editor)
line (-> (.lineAt doc position) (.-text))
character (last (str/trim line))
@rain-1
rain-1 / docker node tip.txt
Last active December 24, 2021 07:04
Easily build NodeJS projects inside a docker container
Here's a quick dockerfile:
----------------8<-------------[ cut here ]------------------
FROM debian:latest
RUN apt-get update && apt-get install -y nodejs npm
----------------8<-------------[ cut here ]------------------
save that as Dockerfile and do: docker build -t node-builder .
@roman01la
roman01la / re-frame.clj
Last active October 21, 2020 11:32
Debugging re-frame subscriptions
(ns utils.re-frame
(:require [cljs.compiler :as cljsc]))
(defn- anonymous-function-declaration? [form]
(and (list? form)
(= 'fn (first form))
(vector? (second form))))
(defn- query-id->js-fn-name [query-id]
(let [ns-part (when-let [ns-part (namespace query-id)]
@threepointone
threepointone / feature-flags.md
Last active May 24, 2023 11:03
Feature flags: why, how, all that

(I'm enjoying doing these raw, barely edited writeups; I hope they're useful to you too)

Feature flags

This is my own writeup on feature flags; for a deep dive I'd recommend something like Martin Fowler's article (https://martinfowler.com/articles/feature-toggles.html).

So. Feature flags. The basic idea that you'll store configuration/values on a database/service somewhere, and by changing those values, you can change the user experience/features for a user on the fly.

Let's say that you're building a new feature, called 'new-button' which changes the color of buttons, which is currently red, to blue. Then you'd change code that looks like this -

@borkdude
borkdude / dev.clj
Last active October 23, 2022 03:41
Work dev script
#!/usr/bin/env bb
(ns dev
(:import java.lang.ProcessBuilder$Redirect)
(:require [clojure.java.io :as io]))
(defn cljs []
(let [cmd ["clojure" "-A:cljs/dev"]
pb (doto (ProcessBuilder. cmd)
(.redirectOutput ProcessBuilder$Redirect/INHERIT)
@borkdude
borkdude / foo.html
Last active December 9, 2020 11:58
Prism Clojure highlighting
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/themes/prism-tomorrow.min.css" rel="stylesheet" />
</head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/components/prism-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.17.1/plugins/autoloader/prism-autoloader.min.js"></script>
<pre>
<code class="language-clojure">
(defn foo []
#!/usr/bin/env bash
set -oe pipefail
jarPath=$1
# inspired by metabase
# Disable limit to amount of time spent in GC. Better slow than not working at all
JAVA_OPTS="$JAVA_OPTS -XX:-UseGCOverheadLimit"
JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC"