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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { load } from "@starfederation/datastar/bundles/datastar-core" | |
| import * as plugins from "@starfederation/datastar/plugins" | |
| // Function to get CSRF token from meta tag | |
| const getCSRFToken = () => { | |
| const meta = document.querySelector('meta[name="csrf-token"]') | |
| return meta ? meta.getAttribute('content') : null | |
| } | |
| // Helper function to create CSRF-enabled HTTP method handlers |
A simple webhook plugin for PocketBase.
Adds a new collection "webhooks" to the admin interface, to manage webhooks.
The webhook record in the following example send create, update, and delete events in the tickets collection
to http://localhost:8080/webhook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| javascript: (() => { | |
| // Set some strings for the common result scenarios. | |
| const support = "Page supports webmentions!"; | |
| const noSupport = "Page does not support webmentions :("; | |
| // Create a dialog element and insert into the DOM. | |
| let d = document.createElement('dialog'); | |
| document.getElementsByTagName('body')[0].appendChild(d); | |
| // Remove the dialog element when it's closed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Abort sign off on any error | |
| set -e | |
| # Start the benchmark timer | |
| SECONDS=0 | |
| # Repository introspection | |
| OWNER=$(gh repo view --json owner --jq .owner.login) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script src="https://gnat.github.io/css-scope-inline/script.js"></script> | |
| <script src="https://gnat.github.io/surreal/surreal.js"></script> | |
| </head> | |
| <body> | |
| <style> | |
| * { box-sizing: border-box; } | |
| html, body { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; } | |
| body { font-family: system-ui, sans-serif; perspective: 1500px; background: linear-gradient(#666, #222); } |
- Modify /etc/nginx/nginx.conf file
- Modify /etc/nginx/sites-available/site.conf file
- Create /etc/nginx/useragent.rule file
Where to find user agent strings?
https://explore.whatismybrowser.com/useragents/explore/software_name/facebook-bot/
Looking for same but for Apache2? Here: https://techexpert.tips/apache/apache-blocking-bad-bots-crawlers/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This demo uses an alpine sandbox in a docker container in | |
| # interactive mode. ran with: | |
| # docker run --rm -it alpine | |
| # | |
| # if you run it on your own system: | |
| # 1. you should use your own package manager instead of `apk` | |
| # 2. expect the following left overs: | |
| # - installed binaries (age, age-keygen, sops) | |
| # - $HOME/.config/sops/age/keys.txt | |
| # - demo files: source.env, encrypted.env, decrypted.env |
NewerOlder