Generating a traefik/nginx password hash without htpasswd

For when you don’t want to install httpd-tools / apache2-utils tl; dr: openssl passwd -apr1 | sed -E “s:[\$]:\$\$:g” (traefik) openssl passwd -apr1 (nginx) Explanations below. Generating a Hash Traefik does basic auth as a middleware. For this you need a password hash. The docs suggest using htpasswd, (eg like htpasswd -nbB), which is grand […]

Continue Reading

Adding Discourse to a mix of nginx-hosted sites [How]

I set up a Discourse server today. It was pleasantly straightforward. The official docs work well enough, though there are a few things I did: integrated with existing nginx sites by cribbing from this guide (short version: forward Discourse requests to a socket) set up email delivery via MailJet- their admin interface makes getting credentials […]

Continue Reading

File creation time on ext4 (Linux)

tl;dr: since coreutils stat does not show file ‘birth’ time, use debugfs -R stat <inode> FS I was curious as to when I wrote a particular time-saving script, so I figured I would look up the file creation time: $ stat ~/scripts/goprofootage.sh File: /home/robert/scripts/goprofootage.sh Size: 1001 Blocks: 8 IO Block: 4096 regular file Device: fe01h/65025d […]

Continue Reading

[Fixed] MySQL: Table is marked as crashed and last (automatic?) repair failed (+ WordPress)

tl;dr: run myisamchk on the problematic table I’ve run into the following error in my Apache error.log recently: Table ‘database.tablename’ is marked as crashed and last (automatic?) repair failed Fortunately the fix is simple: run myisamchk on the table which is marked as crashed: $ sudo su # service mysql stop # cd /var/lib/mysql/databasename # […]

Continue Reading