Skip to content

Instantly share code, notes, and snippets.

@olivergeorge
olivergeorge / Makefile
Last active August 13, 2021 02:06
Devops tools for simple Datomic Ions app
provision:
clojure -A:dev -m devops provision
teardown:
clojure -A:dev -m devops teardown
cloud-on:
clojure -A:dev -m devops cloud-on
@pashields
pashields / reading-list.md
Last active August 17, 2021 20:01
Some things to read

Why Read?

I find myself reading in two very different modes. In one mode, I'm trying to learn something specific typically to unblock me from another task. I might need to know details about a garbage collector or need to know how to write a small compiler. In other cases I'm getting exposed to something entirely new that I know nothing about (e.g lead scoring or purchasing) and need a crash course. It's hard to make general recommendations for this kind of reading. So much is up to the context of your particular topic.

In another mode, I'm trying to broaden my knowledge more generally. I can illuminate gaps in what I know and challenge biases that rarely get checked. In order for this to work, I have to free myself a bit from solving a particular problem. If my reading is a bit more aimless, I'm more likely to get a broader view.

How to read for a broader view

The biggest mistake I made in my youth was avoiding contradiction and ambiguity. When I read something, I was focused on whether I agreed wit

(require '[clojure.core.async.impl.protocols :as impl]
'[clojure.core.async.impl.dispatch :as dispatch])
;;=> nil
(extend-type java.util.concurrent.CompletionStage
impl/ReadPort
(take! [this handler]
(.whenCompleteAsync this
(reify
@addyosmani
addyosmani / lcp.js
Last active March 26, 2024 00:09
Largest Contentful Paint - Puppeteer
const puppeteer = require('puppeteer');
const Good3G = {
'offline': false,
'downloadThroughput': 1.5 * 1024 * 1024 / 8,
'uploadThroughput': 750 * 1024 / 8,
'latency': 40
};
const phone = puppeteer.KnownDevices['Nexus 5X'];
@angerman
angerman / Installation.md
Last active February 1, 2024 11:38
Installing nix on macOS BigSur

The nixos.org website suggests to use:

sh <(curl -L https://nixos.org/nix/install)

For macOS on Intel (x86_64) or Apple Silicon (arm64) based macs, we need to use

sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume
@borkdude
borkdude / api_diff.clj
Last active September 30, 2021 19:37
Print API breakage warnings
#!/usr/bin/env bash
#_" -*- mode: clojure; -*-"
#_(
"exec" "clojure" "-Sdeps" "{:deps {clj-kondo/clj-kondo {:mvn/version \"2020.12.12\"} org.clojure/tools.deps.alpha {:mvn/version \"0.9.857\"} org.slf4j/slf4j-nop {:mvn/version \"1.7.30\"} lambdaisland/deep-diff2 {:mvn/version \"2.0.108\"} juji/editscript {:mvn/version \"0.5.4\"}}}" "-M" "$0" "$@"
)
;; Example usage:
;; api_diff.clj org.clojure/clojure "1.8.0" "1.10.1" > /tmp/diff.txt
(require '[clj-kondo.core :as clj-kondo])
ARCH ?= arm64
VERSION ?= 20.10
SPIN ?= live-server
vftool ?= ./vftool/build/vftool
DATA ?= ./data
ISO := ubuntu-$(VERSION)-$(SPIN)-$(ARCH).iso
MOUNTPOINT := /Volumes/Ubuntu
CD := $(DATA)/$(ISO)
@merlinmann
merlinmann / wisdom.md
Last active April 28, 2025 20:57
Merlin's Wisdom Project (Draft)

Merlin's Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.