Skip to content

Instantly share code, notes, and snippets.

View vegaasen's full-sized avatar
🤠
Howdy

Vegard Aasen vegaasen

🤠
Howdy
View GitHub Profile
@bastman
bastman / exposed-tricks.kt
Last active September 28, 2024 18:05
exposed tricks
# =========
# demo: https://github.com/JetBrains/Exposed/tree/master/src/test/kotlin/demo
# dml tests: https://github.com/JetBrains/Exposed/blob/master/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/DMLTests.kt
# ===== GIS
https://github.com/JetBrains/Exposed/issues/459
# === native
@vegaasen
vegaasen / shell-cheat-sheet.md
Last active July 31, 2026 08:21
Shell Cheat Sheet - my various thoughts and things-to-remember regarding shells

Shell Cheat Sheet

Using jq to find shait in a JSON-file

Using the public API from Bring https://api.bring.com/pickuppoint/api/pickuppoint/no/all I needed to find all pickup point names, and the longest name. Used jq for this:

jq '.pickupPoint[] | .name' response.json >> pickup-points.out
awk '{ if (length($0) > length(longest)) longest = $0 } END { print longest }' pickup-points.out