Skip to content

Instantly share code, notes, and snippets.

jgrodziski /
Created February 26, 2021 16:46
File Watcher
fswatch -o $1 | xargs -n1 -I{} /usr/bin/env bash -c "echo Reloading $2; ~/bin/ $2" reload
jgrodziski / karabiner.json
Last active May 31, 2020 20:34
karabiner elements - shift press alone as parenthesis
//add these 2 rules in ~/.config/karabiner/karabiner.json under profiles/complex_modifications/rules
"description": "Change left_shift to left parens if alone.",
"manipulators": [
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": [
jgrodziski /
Last active February 26, 2021 16:48
Automatic live reload of browser page after file(s) change
osascript <<EOF
tell application "Google Chrome"
set windowList to every window
repeat with aWindow in windowList
set tabList to every tab of aWindow
repeat with atab in tabList
if (URL of atab contains "$1") then
tell atab to reload
(ns promesa-retry
["util" :refer [format]]
[promesa.core :as p :refer [reject! resolve!] :refer-macros [alet await]]
[promesa.async-cljs :refer-macros [async]]
[cljs.test :as t :include-macros true]))
(defn backoff-duration [retries-count interval]
(+ (* interval retries-count) (rand-int interval)))

From Layout - like bold - is my own.

It has been difficult to write .plan updates lately. Every time I start writing something, I realize that I'm not going to be able to cover it satisfactorily in the time I can spend on it. I have found that terse little comments either get misinterpreted, or I get deluged by email from people wanting me to expand upon it.

I wanted to do a .plan about my evolving thoughts on code quality and lessons learned through quake and quake 2, but in the interest of actually completing an update, I decided to focus on one change that was intended to just clean things up, but had a surprising number of positive side effects.

Since DOOM, our games have been defined with portability in mind. Porting to a new platform involves having a way to display output, and having the platform tell you about the various relevant inputs. **There are four principle inputs to a game: keystrokes, mouse moves

; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Layer configuration:
This function should only modify configuration layer settings."
;; Base distribution to use. This is a layer contained in the directory
;; `+distribution'. For now available distributions are `spacemacs-base'
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
sudo bash -c "echo JAVA_HOME="/usr/lib/jvm/java-8-oracle" >> /etc/environment"
java -version
jgrodziski / postgres.clj
Last active October 1, 2023 13:00
Hugsql automatic renaming keys from "snake" to "kebab" using postgres.async and core.async channels
(def xform (map (partial transform-keys ->kebab-case-keyword)))
(defn result-one-snake->kebab
[this result options]
(let [return-chan (chan)]
(pipeline 1 return-chan xform (result-one this result options))
(defmethod hugsql.core/hugsql-result-fn :1 [sym] 'org.myapp.db.postgres/result-one-snake->kebab)
(defmethod hugsql.parameters/apply-hugsql-param :i [param data options] 'org.myapp.db.postgres/result-one-snake->kebab)

Keybase proof

I hereby claim:

  • I am jgrodziski on github.
  • I am jgrodziski ( on keybase.
  • I have a public key whose fingerprint is 5A99 EE65 A0A4 7587 5EB1 EC89 C915 208B FDD0 637E

To claim this, I am signing this object:

jgrodziski / settings.xml
Created September 10, 2017 16:00
maven settings.xml including clojars repo
<settings xmlns=""