@jeorgen

3 Followers
0 Following
25 Posts

TIL there is an online publication from Harvard called "Misinformation Review"

https://misinforeview.hks.harvard.edu/

HKS Misinformation Review

Publishing high quality interdisciplinary research that examines misinformation from different perspectives, from its prevalence and impact to the effectiveness of possible interventions.

HKS Misinformation Review
Spring coming? Trying delete and redraft…
dance

This worked for me to create a self signed certificate for nginx:

openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
-keyout example.key -out example.crt -subj /CN=example.com \
-addext subjectAltName=DNS:example.com,DNS:example.net,IP:10.0.0.1

Taken from here:
https://stackoverflow.com/questions/10175812/how-to-create-a-self-signed-certificate-with-openssl/41366949#41366949

How to create a self-signed certificate with OpenSSL

I'm adding HTTPS support to an embedded Linux device. I have tried to generate a self-signed certificate with these steps: openssl req -new > cert.csr openssl rsa -in privkey.pem -out key.pem o...

"Welcome to the Caddy 2 web server. Configure it by POSTing the configuration to itself"

- head spins -

Wouldn't surprise me if the next doc page says: "You tell Caddy it is a web server by pointing it to itself. It also gains self confidence this way."
https://caddyserver.com/docs/getting-started

Getting Started - Caddy Documentation

Caddy is a powerful, enterprise-ready, open source web server with automatic HTTPS written in Go

The reason for a done callback in Metalsmith is so that you can execute asynchronous things without Metalsmith rushing ahead to the next plugin. In that case you just call done() last in e.g. your promise chain.
Ok it's process.nextTick() that is the prioritized one.

In Metalsmith.js plugins, you often see a "setImmediate" call first with the done function as argument.

I thought it a bit confusing that you call done the first thing you do. It turns out it executes after the rest of the code in the function it is called from. Tested by me now. At least unless there are calls in there that might slot it in, such as setTimeout() . Gotta check it, hmm turns out the called code in setTimeout is still called before the setImmediate code…
https://flaviocopes.com/node-setimmediate/

Understanding setImmediate()

The Node.js setImmediate function interacts with the event loop in a special way

I had two different user sharing a directory structure with the setgid bit. However when one user created the directory, the other user could not write to it. The other way was no problem. The both share the same group.

It turned out the difference was in the users' umask. One had the umask of 002 which allowed for write permission for group to go through, the other one had the more conservative 022 and that blocked write for the group.

One solution is to set umask 002 directly in the terminal