251 private links
One way to simplify your stack and reduce the moving parts, speed up development, lower the risk and deliver more features in your startup is “Use Postgres for everything”. Postgres can replace - up to millions of users - many backend technologies, Kafka, RabbitMQ, Mongo and Redis among them.
Use Postgres for caching instead of Redis with UNLOGGED tables and TEXT as a JSON data type. Use stored procedures to add and enforce an expiry date for the data just like in Redis.
Use Postgres as a message queue with SKIP LOCKED instead of Kafka (if you only need a message queue).
Use Postgres with Timescale as a data warehouse.
Use Postgres with JSONB to store Json documents in a database, search and index them - instead of Mongo.
Use Postgres as a cron demon to take actions at certain times, like sending mails, with pg_cron adding events to a message queue.
Use Postgres for Geospacial queries.
Use Postgres for Fulltext Search instead of Elastic.
Use Postgres to generate JSON in the database, write no server side code and directly give it to the API.
Use Postgres with a GraphQL adapter to deliver GraphQL if needed.
Comment déployer avec nixops à partir de nix flakes
Small Gnome Shell Extension to enable Teams & Zoom Screensharing under Wayland. - GitHub - julianpollmann/zoom-wayland-gnome-extension: Small Gnome Shell Extension to enable Zoom Screensharing under Wayland.
Hypercubing is a niche branch of Rubik's Cubing that focuses on solving higher dimensional twisty puzzles.
simulation de twisting cubes 3D et 4D
Moteur de recherche des bibliothèques clandestines : livres, journaux, BD, magazines. ⭐️ Bibliothèque Z-Library, Bibliothèque Genesis, Sci-Hub. ⚙️ Entièrement résilient grâce à un code et à des données open source.
Partage d'écran en lecture seule avec ssh tmux et tunel ssh
Problem: I want to let co-workers watch me work for educational purposes, but I work best on my own laptop.
Solution: Permit them SSH access to a shared read-only tmux session.
Step 1: Create guest user login shell script
This executable will be set as the login shell for the guest user.
!/usr/bin/env bash
exec /usr/bin/tmux -S /var/lib/tmux-sessions/guest attach -r
The ''-r'' argument attaches a read-only session, but at this time of writing read-only users are still able to resize the window. A patch exists to prevent this but I'm not interested.
Step 2: Create tmux sessions directory
This is where the shared tmux session will live.
$ sudo mkdir -p /var/lib/tmux-sessions
$ sudo chown -R stemid:wheel /var/lib/tmux-sessions
Step 3: Create guest user account
$ sudo useradd -d /home/guest -m -s /usr/bin/guest-login guest
Step 4: Add your co-workers public SSH key to the guest account
$ sudo mkdir -p /home/guest/.ssh
$ sudo vim /home/guest/.ssh/authorized_keys
$ sudo chmod 0700 /home/guest/.ssh
$ sudo chmod 0600 /home/guest/.ssh/authorized_keys
$ sudo chown -R guest:guest /home/guest/.ssh
Step 5: Create a new tmux session
The session file created must have its permissions changed after creation.
$ tmux -S /var/lib/tmux-sessions/guest new -s guest
$ chgrp guest /var/lib/tmux-sessions/guest
Step 6: Create a reverse ssh tunnel on some server you can both access
Let's say linux-web02 is a server we both have access to. So I'll create a listening port on it that leads back to my own laptop like this.
$ ssh -Rlocalhost:1502:localhost:22 linux-web02
My co-worker will connect to it like this.
$ ssh -J linux-web02 -p 1502 -l guest localhost
Step 7: Disable the guest user
Toggle the guest user like this.
$ sudo usermod -s /usr/bin/nologin guest
$ sudo usermod -s /usr/bin/guest-login guest
Step 8: Bonus pointers
Disable password login in your OpenSSH server
Use AllowGroup ssh in your sshd config and add your own user and any other ssh guest user to the ssh group
Then remove the guest user from the group for added security
Diátaxis identifies four modes of documentation - tutorials, how-to guides, technical reference and explanation. It derives its structure from the relationship between them.
The More Loving One
W. H. Auden - 1907-1973
Looking up at the stars, I know quite well
That, for all they care, I can go to hell,
But on earth indifference is the least
We have to dread from man or beast.
How should we like it were stars to burn
With a passion for us we could not return?
If equal affection cannot be,
Let the more loving one be me.
Admirer as I think I am
Of stars that do not give a damn,
I cannot, now I see them, say
I missed one terribly all day.
Were all stars to disappear or die,
I should learn to look at an empty sky
And feel its total dark sublime,
Though this might take me a little time.