Skip to content

Instantly share code, notes, and snippets.

(defn ^:private static-ring-handler
[app-config]
(ring/ring-handler (router)
(ring/routes
(ring/create-resource-handler {:path "/" :not-found-handler general-handler/not-found})
(ring/create-default-handler))))
(defn ^:private repl-friendly-ring-handler
[app-config]
@dharrigan
dharrigan / babashka-timings.adoc
Created July 24, 2021 12:21
Babashka Timings on a M1 Mac Book Pro

Babashka Timings

FIRST RUN

❯ ./script/compile
Downloading: Component catalog from www.graalvm.org
Processing Component: Native Image
Component Native Image (org.graalvm.native-image) is already installed.
Warning: Ignoring server-mode native-image argument --no-server.
@dharrigan
dharrigan / babashka-timings.adoc
Created July 24, 2021 12:12
Babashka Timings on a M1 Mac Book Pro

Babashka Timings

FIRST RUN

❯ ./script/compile Downloading: Component catalog from www.graalvm.org Processing Component: Native Image Component Native Image (org.graalvm.native-image) is already installed. Warning: Ignoring server-mode native-image argument --no-server. Executing [

[user]
name = David Harrigan
email = dharrigan@gmail.com
signingkey = dharrigan@gmail.com
[includeIf "gitdir:~/development/workspaces/healthunlocked/"]
path = .gitconfig-healthunlocked
[init]
templateDir = ~/.git-templates
defaultBranch = master
[core]
@dharrigan
dharrigan / git-mmctag
Last active October 17, 2020 16:07
git major minor commits tag script
#!/usr/bin/env bash
# For projects that follow the version scheme MAJOR.MINOR.COMMITS where MAJOR
# and MINOR provide some relative indication of the size of the change, but do
# not follow semantic versioning. In general, all changes endeavor to be
# non-breaking (by moving to new names rather than by breaking existing
# names). COMMITS is an ever-increasing counter of commits since the
# beginning of this repository.
# Just put this file into your $PATH somewhere, e.g., `~/bin` then use
create or replace function cleanup_tag() returns trigger
language 'plpgsql'
as $body$
begin
delete from tag where id = OLD.tag_id;
return null;
end;
$body$;
drop table if exists post cascade;