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

Compressing Teamspeak 3 Recordings Using sox

tl;dr: Loop through the files in bash, sox them to FLAC Success! I’ve been combining fileserver contents recently, and I came across a little archive of Teamspeak 3 recordings: $ du -sh . 483G /home/robert/storage/media/ts_recordings/ Eep. I wrote a quick-and-dirty script to convert the files: #!/bin/bash n=0 total=$(ls *.wav|wc) ls *.wav | while read file; […]

Continue Reading

[Solved] “Logical volume is used by another device”

tl;dr: use dmsetup remove before trying lvremove Note: Volume group and logical volume names have been substituted here. I’m not entirely sure it’s necessary, but better safe than sorry. If following this, please use the names of your volume group[s] and logical volume[s] I am in the process of combining fileserver information, and so I […]

Continue Reading