Skip to content

Instantly share code, notes, and snippets.

View esuomi's full-sized avatar

Esko Suomi esuomi

  • Helsinki, Finland
View GitHub Profile
@esuomi
esuomi / Makefile
Last active October 19, 2017 07:09
# This top level Makefile runs make in all subdirectories with Makefiles in them
# Original taken from https://stackoverflow.com/a/17845120
#
# TOPTARGETS define all make commands which can be used in all Makefiles within this repo
TOPTARGETS := clean build test publish-dev publish-prod
SUBDIRS := $(shell find . -mindepth 2 -name "Makefile" | xargs dirname)
.PHONY: $(TOPTARGETS) $(SUBDIRS)
$(TOPTARGETS): $(SUBDIRS)
@esuomi
esuomi / update-poetry.py
Created August 31, 2020 14:05
Run this + poetry update after it in git post-merge hook to sync requirements.txt to working Poetry environment automatically
import tempfile
import re
def write_requirements(target_file):
with open("requirements.txt", "r") as deps:
for depline in deps:
m = re.search("^(.+)==(.+)$", depline)
target_file.write(m.group(1) + " = \"" + m.group(2) + "\"\n")
if __name__ == '__main__':
@esuomi
esuomi / log.clj
Created August 19, 2022 11:53
colored logging output for clojure.tools.logging using puget and aviso pretty
; deps:
[org.slf4j/slf4j-api "1.7.36"]
[ch.qos.logback/logback-classic "1.2.11"]
[org.clojure/tools.logging "1.2.4"]
[io.aviso/pretty "1.1.1"]
[mvxcvi/puget "1.3.2"]
; shim code:
(ns mantle.log
(:require [clojure.string :as str]
@esuomi
esuomi / mando_s3.md
Created August 8, 2023 10:53
Mandalorian season 3 reframed

Mandalorian season 3 reframed or what I think was the original story before executive meddling. Each paragraph is roughly one episode.

Season starts off with BOBF Chapter 5: Return of the Mandalorian and for the most part is exactly what happens in this episode, with the exception that Mando’s spear is not turned into chainmail. Whether this was meant to happen at the underside of Halo or not, who knows, but I’d say probably, since Mando isn’t very mobile at this point. Mando goes on a quest to redeem himself as he’s now an apostate. Because of his low interplanetary mobility, Mando takes the spacebus to Tatooine to visit Peli Motto and acquires the Hot Rod N-1, with R5-D4 as its astromech.

Mando goes to Kalevala to see Bo-Katan, as seen at end of Mandalorian s3e01. Nothing else is relevant from that episode, IG-11 plotline doesn’t exist, Grogu lives with Luke where he’s training his jedi powers, he’s not part of the show. Bo-Katan still sulks, but agrees to go to Mandalore just to prove a point abo

@esuomi
esuomi / pom.xml
Created November 29, 2023 09:32
Maven local repository
<repositories>
<!-- local mirror for hard-to-get dependencies -->
<repository>
<id>local-dependencies</id>
<name>local-dependencies</name>
<url>file://${project.basedir}/local-dependencies</url>
</repository>
</repositories>