mkdir osm
wget -O osm/planet.mbtiles https://hidrive.ionos.com/api/sharelink/download?id=SYEgScrRe
podman run -ti --rm -p 9000:9000 --name sms -v $(pwd)/osm/:/data/ registry.gitlab.com/markuman/sms:latest
firefox http://localhost:9000
CREATE EXTENSION ltree; | |
CREATE TABLE test (path ltree); | |
-- Top | |
-- / | \ | |
-- Science Hobbies Collections | |
-- / | \ | |
-- Astronomy Amateurs_Astronomy Pictures |
(ns user.blog-100-loc-crud-app | |
"Concrete minimum viable crud app that demonstrates strong composition and real world edge cases" | |
(:require | |
[clojure.spec.alpha :as s] | |
#?(:clj [datomic.api :as d]) | |
[hyperfiddle.api :as hf] | |
[hyperfiddle.photon :as p] | |
[hyperfiddle.photon-dom :as dom] | |
[hyperfiddle.html5 :as-alias html])) |
The set
lines
- These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
- With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
set -euxo pipefail
is short for:
set -e
set -u
Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct
This TRIGGER function calls PosgreSQL's NOTIFY
command with a JSON payload. You can listen for these calls and then send the JSON payload to a message queue (like AMQP/RabbitMQ) or trigger other actions.
Create the trigger with notify_trigger.sql.
When declaring the trigger, supply the column names you want the JSON payload to contain as arguments to the function (see create_triggers.sql)
The payload returns a JSON object:
The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
# Sample DATABASE_URL = dbms://username:password@hostname:port/dbname | |
DB_PROTOCOL=$(echo $DATABASE_URL | cut -d':' -f1) | |
DB_DETAILS=$(echo $DATABASE_URL | cut -d'/' -f3) | |
DB_NAME=$(echo $DATABASE_URL | cut -d'/' -f4) | |
HOST_NAME=$(echo $DB_DETAILS | cut -d'@' -f2 | cut -d':' -f1) | |
PORT=$(echo $DB_DETAILS | cut -d'@' -f2 | cut -d':' -f2) | |
USER_NAME=$(echo $DB_DETAILS | cut -d'@' -f1 | cut -d':' -f1) | |
PASSWORD=$(echo $DB_DETAILS | cut -d'@' -f1 | cut -d':' -f2) | |
function doStripe() { | |
if (!document.getElementById('card-element')) { | |
return; | |
} | |
var stripe = Stripe(window.stripe_key); | |
var elements = stripe.elements(); | |
var style = {}; | |
var card = elements.create('card', {style: style}); |