When coming to Jujutsu, one may try to emulate their Git workflows directly. This is possible, but can cause a lot of difficulty.
This guide shows how to translate Git workflows to Jujutsu.
version: "3.5" | |
services: | |
gitlab: | |
image: gitlab/gitlab-ce:latest | |
hostname: "localhost" | |
restart: unless-stopped | |
environment: | |
GITLAB_OMNIBUS_CONFIG: | | |
external_url 'http://localhost' | |
gitlab_rails['gitlab_shell_ssh_port'] = 8822 |
// ==UserScript== | |
// @name Send selected content to Obsidian as markdown | |
// @version 0.6.8 | |
// @match *://*/* | |
// @author Flashwalker | |
// @description Gareth Stretton https://medium.com/@gareth.stretton/obsidian-create-your-own-web-clipper-add83c7662d0 + StackOverflow https://stackoverflow.com/questions/4176923/html-of-selected-text/4177234#4177234 | |
// @updateURL https://gist.github.com/Flashwalker/40f23e01942cc72a47df61bb86821714/raw/obsidian-webclip-as-markdown.user.js | |
// @downloadURL https://gist.github.com/Flashwalker/40f23e01942cc72a47df61bb86821714/raw/obsidian-webclip-as-markdown.user.js | |
// @homepage https://gist.github.com/Flashwalker/40f23e01942cc72a47df61bb86821714 | |
// @require https://unpkg.com/turndown/dist/turndown.js |
This logging setup configures Structlog to output pretty logs in development, and JSON log lines in production.
Then, you can use Structlog loggers or standard logging
loggers, and they both will be processed by the Structlog pipeline (see the hello()
endpoint for reference). That way any log generated by your dependencies will also be processed and enriched, even if they know nothing about Structlog!
Requests are assigned a correlation ID with the asgi-correlation-id
middleware (either captured from incoming request or generated on the fly).
All logs are linked to the correlation ID, and to the Datadog trace/span if instrumented.
This data "global to the request" is stored in context vars, and automatically added to all logs produced during the request thanks to Structlog.
You can add to these "global local variables" at any point in an endpoint with `structlog.contextvars.bind_contextvars(custom
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432 | |
# Password: | |
# psql (9.1.10, server 0.0.0) | |
# WARNING: psql version 9.1, server version 0.0. | |
# Some psql features might not work. | |
# Type "help" for help. | |
# | |
# th30z=> select foo; | |
# a | b | |
# ---+--- |
A friend recently learned about Proebsting's law and mentioned it to me off hand. I knew about the law's existence but I never really asked myself - do I believe in it?
For people who aren't aware, Proebsting's law states:
Compiler Advances Double Computing Power Every 18 Years
Which is to say, if you upgrade your compiler every 18 years, you would expect on average your code to double in performance on the same hardware.
Update: I created jq-zsh-plugin that does this.
One of my favourite tools of my trade is jq. It essentially enables you to process json streams with the same power that sed, awk and grep provide you with for editing line-based formats (csv, tsv, etc.).
Another one of my favourite tools is fzf.