summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2020-12-31 15:40:09 -0500
committerlxf <sng@luxagraf.net>2020-12-31 15:40:09 -0500
commit908696ae0af8463d3034d96e306b0ab8091045e0 (patch)
tree4cf6102208dd033d6d5dce0997929fdcb41e5893 /src
parentc3b84f7147cf93ce7e500338bed4292384011bbc (diff)
rolled in latest changes
Diffstat (limited to 'src')
-rw-r--r--src/how-use-websters-1913-dictionary-linux-edition.txt39
-rw-r--r--src/kindle-hacking.txt16
-rw-r--r--src/qutebrowser-notes.txt18
-rw-r--r--src/solving-common-nextcloud-problems.txt92
-rw-r--r--src/vagrant-custom-box.txt171
-rw-r--r--src/why-i-built-my-own-mailing-list-software.txt52
6 files changed, 388 insertions, 0 deletions
diff --git a/src/how-use-websters-1913-dictionary-linux-edition.txt b/src/how-use-websters-1913-dictionary-linux-edition.txt
new file mode 100644
index 0000000..12898f3
--- /dev/null
+++ b/src/how-use-websters-1913-dictionary-linux-edition.txt
@@ -0,0 +1,39 @@
+I suspect the overlap of Linux users and writers who care about the Webster's 1913 dictionary is vanishingly small. Quite possible just me. But in case there are others, I am committing these words to internet. Plus I will need them in the future when I forget how I set this up.
+
+Here is how you install, set up, and configure the command line app `sdcv` so that you too can have the one true dictionary at your fingertips in the command line app of your choosing.
+
+But first, about the one true dictionary.
+
+The one true dictionary is debatable I suppose. Feel free to debate. I have a "compact" version of the Oxford English Dictionary sitting on my desk and it is weighty both literally and figuratively in ways that the Webster's 1913 is not, but any dictionary that deserves consideration as your one true dictionary ought to do more than spit out dry, banal collections of words.
+
+John McPhee writes eloquently about the power of a dictionary in his famous New Yorker essay, *[Draft No 4](https://www.newyorker.com/magazine/2013/04/29/draft-no-4)*, which you can find in paper in [the compilation of essays by the same name](https://bookshop.org/books/draft-no-4-on-the-writing-process/9780374537975). Fellow New Yorker writer James Somers has [a brilliant essay on the genius of McPhee's dictionary](http://jsomers.net/blog/dictionary) and how you can get it installed on your Mac.
+
+Remarkably, the copy of the Webster's 1913 that Somers put up is still available. So go grab that.
+
+However, while his instructions are great for macOS users, they don't work on Linux and moreover they don't offer access from the shell. I write in Vim, in a tmux session, so I wanted an easy way to look things up without switching apps.
+
+The answer is named `sdcv`. It is, in the words of its man page, "a simple, cross-platform text-based utility for working with dictionaries in StarDict format." That last bit is key, because the Webster's 1913 file you downloaded from Somers is in StarDict format. I installed `sdcv` from the Arch Community repository, but it's in Debian and Ubuntu's official repos as well.
+
+Once `sdcv` is install you need to unzip that dictionary.zip file you should have grabbed from Somers' post. That will give you four files. All we need to do now is move them somewhere `sdcv` can find them. By default that's `$(XDG_DATA_HOME)/stardict/dic`, although you can customize that by add thing Environment variable `STARDICT_DATA_DIR` to your .bashrc. I keep my dictionaries in `~/bin/dict` folder so I just drop this in .bashrc:
+
+~~~bash
+STARDICT_DATA_DIR="$HOME/bin/dict/
+~~~
+
+### How to Lookup Words in Webster's 1913 from the Command Line
+
+To use your new one true dictionary, all you need to do is type `sdcv` and the word you'd like to look up. Add a leading '/' before the word and `sdcv` will use a fuzzy search algorithm, which is handy if you're unsure of the spelling. Search strings can use `?` and `*` for regex searching. I have never used either.
+
+My use is very simple. I wrote a little Bash function that looks like this:
+
+~~~bash
+function d() {
+ sdcv "$1" | less
+}
+~~~
+
+With this I type `d search_term` and get a paged view of the Webster's 1913 entry for that word. Since I always write in a tmux split, I just move my cursor to the blank split, type my search term and I can page through and read it while considering the context in the document in front of me.
+
+### But I Want a GUI
+
+Check out [StarDict](http://www.huzheng.org/stardict/), there are versions for Linux, Windows, and macOS, as well as source code.
diff --git a/src/kindle-hacking.txt b/src/kindle-hacking.txt
new file mode 100644
index 0000000..064c700
--- /dev/null
+++ b/src/kindle-hacking.txt
@@ -0,0 +1,16 @@
+links:
+
+[Installing ADB and Fastboot on Linux & Device Detection "Drivers"](https://forum.xda-developers.com/android/general/guide-installing-adb-fastboot-linux-adb-t3478678)
+
+You need to be on 6.3.1.2 firmware:
+[Fire HD 8 2018 (karnak) amonet-3](https://forum.xda-developers.com/hd8-hd10/orig-development/unlock-fire-hd-8-2018-karnak-amonet-3-t3963496/page52)
+
+[Download 6.3.1.2 firmware](https://fireos-tablet-src.s3.amazonaws.com/LlO8A9g4Q6ugQCylaeqWBWxYBb/update-kindle-Fire_HD8_8th_Gen-NS6312_user_1852_0002517056644.bin)
+
+2. Download the amazon frimware above and keep it where you can flash it.
+3. Boot into recovery (Volume Down + Power at the same time)
+4. Select "adb sideload" or whatever it says using your volume keys and press the power to select
+5. Now adb sideload <frimware>.bin
+
+https://www.youtube.com/watch?v=sN6PphcI6XQ
+
diff --git a/src/qutebrowser-notes.txt b/src/qutebrowser-notes.txt
new file mode 100644
index 0000000..584a47a
--- /dev/null
+++ b/src/qutebrowser-notes.txt
@@ -0,0 +1,18 @@
+handy commands:
+ :download
+
+## shortcuts
+
+xo - open url in background tab
+go - edit current url
+gO - edit current url and open result in new tab
+gf - view source
+;y - yank hinted url
+;i - hint only images
+;b - open hint in background tab
+;d - download hinted url
+PP - Open URL from selection in new tab
+ctrl+a Increment no. in URL
+ctrl+x Decrement no. in URL
+
+Solarized theme: https://bitbucket.org/kartikynwa/dotty2hotty/src/1a9ba9b80f07e1f63b740da5e6970dc5a97f1037/qutebrowser.py?at=master&fileviewer=file-view-default
diff --git a/src/solving-common-nextcloud-problems.txt b/src/solving-common-nextcloud-problems.txt
new file mode 100644
index 0000000..b32a629
--- /dev/null
+++ b/src/solving-common-nextcloud-problems.txt
@@ -0,0 +1,92 @@
+I love [NextCloud](https://nextcloud.com). Nextcloud allows me to have all the convenience of Dropbox, but hosted by me, controlled by me, and customized to suit my needs. I mainly use the file syncing, calendar, and contacts features, but Nextcloud can do a crazy amount of things.
+
+The problem with NextCloud, and maybe you could argue that this is the price you pay for the freedom and control, is that I find it requires a bit of maintenance to keep it running smoothly. Nextcloud does some decidedly odd things from time to time, and knowing how to deal with them can save you some disk space and maybe avoid syncing headaches.
+
+I should note, that while I call these problems, I **have never lost data** using Nextcloud. These are really more annoyances and some ways to prevent them than *problems*.
+
+### How to Get Rid of Huge Thumbnails in Nextcloud
+
+If Nextcloud is taking up more disk space than you think it should, or your Nextcloud storage space is just running low, the first thing to check is the image thumbnails directory.
+
+At one point I poked around in the Nextcloud `data` directory and found 11-gigabytes worth of image previews for only 6-gigabytes worth of actual images stored. That is crazy. That should never happen.
+
+Nextcloud's image thumbnail defaults err on the side of "make it look good in the browser" where as I prefer to err on the side of keep it really small.
+
+I did some research and came up with a few solutions. First, it looks like my runaway 11-gigabyte problem might have been due to a bug in older versions of Nextcloud. Ideally I will not hit that issue again. But, I don't admin servers with hope and optimism, so I figured out how to tell Nextcloud to generate smaller image previews. I almost never look at the images within the web UI, so I really don't care about the previews at all. I made them much, much smaller than the defaults. Here's the values I use:
+
+~~~bash
+occ config:app:set previewgenerator squareSizes --value="32 256"
+occ config:app:set previewgenerator widthSizes --value="256 384"
+occ config:app:set previewgenerator heightSizes --value="256"
+occ config:system:set preview_max_x --value 500
+occ config:system:set preview_max_y --value 500
+occ config:system:set jpeg_quality --value 60
+occ config:app:set preview jpeg_quality --value="60"
+~~~
+
+Just ssh into your Nextcloud server and run all these commands. If you followed the basic Nextcloud install instructions you'll want to run these as your web server user. For me, with NextCloud running on Debian 10, the full command looks like this:
+
+~~~bash
+sudo -u www-data php /var/www/nextcloud/occ config:app:set previewgenerator squareSizes --value="32 256"
+sudo -u www-data php /var/www/nextcloud/occ config:app:set previewgenerator widthSizes --value="256 384"
+# and so on, running all the commands listed above
+~~~
+
+This assumes you installed Nextcloud into the directory `/var/www/nextcloud`, if you installed it somewhere else, adjust the path to the Nextcloud command line tool `occ`.
+
+That will stop Nextcloud from generating huge preview files. So far so good. I deleted the existing previews and reclaimed 11-gigabytes. Sweet. You can pre-generate previews, which will make the web UI faster if you browse images in it. I do not, so I didn't generate any previews ahead of time.
+
+### How to Solve `File is Locked` Issues in Nextcloud
+
+No matter what I do, I always end up with locked file syncing issues. Researching this led me to try using Redis to cache things, but that didn't help. I don't know why this happens. I blame PHP. When in doubt, blame PHP.
+
+Thankfully it doesn't happen very often, but every six months or so I'll see an error, then two, then they start piling up. Here's how to fix it.
+
+First, put Nextcloud in maintenance mode (again, assuming Debian 10, with Nextcloud in the `/var/www/nextcloud` directory):
+
+~~~bash
+sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
+~~~
+
+Now we're going directly into the database. For me that's Postgresql. If you use Mysql or Mariadb, you may need to adjust the syntax a little.
+
+~~~bash
+psql -U yournextclouddbuser -hlocalhost -d yournextclouddbname
+password:
+nextclouddbname=> DELETE FROM oc_file_locks WHERE True;
+~~~
+
+That should get rid of all the locked file problems. For a while anyway.
+
+Don't forget to turn maintenance mode off:
+
+~~~bash
+sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
+~~~
+
+### Force a File Re-Scan
+
+If you frequently add and remove folders from Nextcloud, you may sometimes run into issues. I usually add a folder at the start of a new project, and then delete it when the project is finished. Mostly this just works, even with shared folders, on the rare occasion that I used them, but sometimes Nextcloud won't delete a folder. I have no idea why. It just throws an unhelpful error in the web admin and refuses to delete the folder from the server.
+
+I end up manually deleting it on the server using: `rm -rf path/to/storage/folder`. Nextcloud however, doesn't always seem to notice that the folder is gone, and still shows it in the web and sync client interfaces. The solution is to force Nextcloud to rescan all its files with this command:
+
+~~~bash
+sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
+sudo -u www-data php /var/www/nextcloud/occ files:scan --path="yournextcloudusername/files/NameOfYourExternalStorage"
+sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
+~~~
+
+Beware that on large data directories this can take some time. It takes about 30 seconds to scan my roughly 30GB of files.
+
+### Mostly Though, Nextcloud is Awesome
+
+Those are three annoyances I've hit with Nextcloud over the years and the little tricks I've used to solve them. Lest anyone think I am complaining, I am not. Not really anyway. The image thumbnail thing is pretty egregious for a piece of software that aims to be enterprise grade, but mostly Nextcloud is pretty awesome.
+
+I rely on Nextcloud for files syncing, Calendar and Contact hosting, and keeping my notes synced across devices. Aside from these three things, I have never had a problem.
+
+####Shoulder's Stood Upon
+
+* [Nextcloud's documentation](https://docs.nextcloud.com) isn't the best, but can help get you pointed in the right direction.
+* I tried a few different solutions to the thumbnail problem, especially helpful was this post on [Understanding and Improving Nextcloud Previews](https://ownyourbits.com/2019/06/29/understanding-and-improving-nextcloud-previews/), but nachoparker.
+* The [file lock solution](https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883) comes from the Nextcloud forums.
+* The solution to scanning external storages comes from the [Nextcloud forums](https://help.nextcloud.com/t/automate-occ-filescan/35282/4).
diff --git a/src/vagrant-custom-box.txt b/src/vagrant-custom-box.txt
new file mode 100644
index 0000000..d73019d
--- /dev/null
+++ b/src/vagrant-custom-box.txt
@@ -0,0 +1,171 @@
+I'm a little old fashioned with my love of Vagrant. I should probably keep up with the kids, dig into to Docker and containers, but I like managing servers. I like to have the whole VM at my disposal.
+
+Why Vagrant? Well, I run Arch Linux on my laptop, but I usually deploy sites to either Debian, preferably v9, "Stretch", or (if a client is using AWS) Ubuntu, which means I need a virtual machine to develop and test in. Vagrant is the easiest way I've found to manage that workflow.
+
+When I'm deploying to Ubuntu-based machines I develop using the [Canonical-provided Vagrant box](https://app.vagrantup.com/ubuntu/boxes/bionic64) available through Vagrant's [cloud site](https://app.vagrantup.com/boxes/search). There is, however, no official Debian box provided by Debian. Worse, the most popular Debian 9 box on the Vagrant site has only 512MB of RAM. I prefer to have 1 or 2GB of RAM to mirror the cheap, but surprisingly powerful, [Vultr VPS instances](https://www.vultr.com/?ref=6825229) I generally use (You can use them too, in my experience they're faster and slightly cheaper than Digital Ocean. Here's a referral link that will get you [$50 in credit](https://www.vultr.com/?ref=7857293-4F)).
+
+That means I get to build my own Debian Vagrant box.
+
+Building a Vagrant base box from Debian 9 "Stretch" isn't hard, but most tutorials I found were outdated or relied on third-party tools like Packer. Why you'd want to install, setup and configure a tool like Packer to build one base box is a mystery to me. It's far faster to do it yourself by hand (which is not to slag Packer, it *is* useful when you're building an image from AWS or Digital Ocean or other provider).
+
+Here's my guide to building a Debian 9 "Stretch" Vagrant Box.
+
+### Create a Debian 9 Virtual Machine in Virtualbox
+
+We're going to use Virtualbox as our Vagrant provider because, while I prefer qemu for its speed, I run into more compatibility issues with qemu. Virtualbox seems to work everywhere.
+
+First install Virtualbox, either by [downloading an image](https://www.virtualbox.org/wiki/Downloads) or, preferably, using your package manager/app store. We'll also need the latest version of Debian 9's netinst CD image, which you can [grab from the Debian project](https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/) (scroll to the bottom of that page for the actual downloads).
+
+Once you've got a Debian CD, fire up Virtualbox and create a new virtual machine. In the screenshot below I've selected Expert Mode so I can go ahead and up the RAM (in the screenshot version I went with 1GB).
+
+<img src="images/2019/debian9-vagrant-base-box-virtualmachine.jpg" id="image-1859" class="picfull" />
+
+Click "Create" and Virtualbox will ask you about the hard drive, I stick with the default type, but bump the size to 40GB, which matches the VPS instances I use.
+
+<img src="images/2019/debian9-vagrant-base-box-virtualdisk.jpg" id="image-1860" class="picfull" />
+
+Click "Create" and then go to the main Virtualbox screen, select your new machine and click "Settings". Head to the audio tab and uncheck the Enable Audio option. Next go to the USB tab and disable USB.
+
+<img src="images/2019/debian9-vagrant-base-box-no-audio.jpg" id="image-1855" class="picfull" />
+<img src="images/2019/debian9-vagrant-base-box-no-usb.jpg" id="image-1856" class="picfull" />
+
+Now click the network tab and make sure Network Adapter 1 is set to NAT. Click the "Advanced" arrow and then click the button that says Port Forwarding. Add a port forwarding rule. I call mine SSH, but the name isn't important. The important part is that the protocol is TCP, the Host and Guest IP address fields are blank, the Host port is 2222, the Guest port is 22.
+
+<img src="images/2019/debian9-vagrant-base-box-port-forward_EqGwcg4.jpg" id="image-1858" class="picfull" />
+
+Hit okay to save your changes on both of those screens and now we're ready to boot Debian.
+
+### Install Debian
+
+To get Debian installed first click the start button for your new VM and Virtualbox will boot it up and ask you for the install CD. Navigate to wherever you saved the Debian netinst CD we downloaded earlier and select that.
+
+That should boot you to the Debian install screen. The most important thing here is to make sure you choose the second option, "Install", rather than "Graphical Install". Since we disabled USB, we won't have access to the mouse and the Debian graphical installer won't work. Stick with plain "Install".
+
+<img src="images/2019/debian9-vagrant-base-box-vm-install.jpg" id="image-1861" class="picfull" />
+
+From here it's just a standard Debian install. Select the appropriate language, keyboard layout, hostname (doesn't matter), and network name (also doesn't matter). Set the root password to something you'll remember. Debian will then ask you to create a user. Create a user named "vagrant" (I used "vagrant" for the fullname and username) and set the password to "vagrant".
+
+Tip: to select (or unselect) a check box in the Debian installer, hit the space bar.
+
+Then Debian will get the network time, ask what timezone you're in and start setting up the disk. I go with the defaults all the way through. Next Debian will install the base system, which takes a minute or two.
+
+Since we're using the netinst CD, Debian will ask if we want to insert any other CDs (no), and then it will ask you to choose which mirrors to download packages from. I went with the defaults. Debian will then install Linux, udev and some other basic components. At some point it will ask if you want to participate in the Debian package survey. I always go with no because I feel like a virtual machine might skew the results in unhelpful ways, but I don't know, maybe I'm wrong on that.
+
+After that you can install your software. For now I uncheck everything except standard system utils (remember, you can select and unselect items by hitting the space bar). Debian will then go off and install everything, ask if you want to install Grub (you do -- select your virtual disk as the location for grub), and congratulations, you're done installing Debian.
+
+Now let's build a Debian 9 base box for Vagrant.
+
+### Set up Debian 9 Vagrant base box
+
+Since we've gone to the trouble of building our own Debian 9 base box, we may as well customize it.
+
+The first thing to do after you boot into the new system is to install sudo and set up our vagrant user as a passwordless superuser. Login to your new virtual machine as the root user and install sudo. You may as well add ssh while you're at it:
+
+~~~~console
+apt install sudo ssh
+~~~~
+
+Now we need to add our vagrant user to the sudoers list. To do that we need to create and edit the file:
+
+~~~~console
+visudo -f /etc/sudoers.d/vagrant
+~~~~
+
+That will open a new file where you can add this line:
+
+~~~~console
+vagrant ALL=(ALL) NOPASSWD:ALL
+~~~~
+
+Hit control-x, then "y" and return to save the file and exit nano. Now logout of the root account by typing `exit` and login as the vagrant user. Double check that you can run commands with `sudo` without a password by typing `sudo ls /etc/` or similar. If you didn't get asked for a password then everything is working.
+
+Now we can install the vagrant insecure SSH key. Vagrant sends commands from the host machine over SSH using what the Vagrant project calls an insecure key, which is so called because everyone has it. We could in theory, all hack each other's Vagrant boxes. If this concerns you, it's not that complicated to set up your own more secure key, but I suggest doing that in your Vagrant instance, not the base box. For the base box, use the insecure key.
+
+Make sure you're logged in as the vagrant user and then use these commands to set up the insecure SSH key:
+
+~~~~console
+mkdir ~/.ssh
+chmod 0700 ~/.ssh
+wget https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub -O ~/.ssh/authorized_keys
+chmod 0600 ~/.ssh/authorized_keys
+chown -R vagrant ~/.ssh
+~~~~
+
+Confirm that the key is in fact in the `authorized_keys` file by typing `cat ~/.ssh/authorized_keys`, which should print out the key for you. Now we need to set up SSH to allow our vagrant user to sign in:
+
+~~~~console
+sudo nano /etc/ssh/sshd_config
+~~~~
+
+Uncomment the line `AuthorizedKeysFile ~/.ssh/authorized_keys ~/.ssh/authorized_keys2` and hit `control-x`, `y` and `enter` to save the file. Now restart SSH with this command:
+
+~~~~console
+sudo systemctl restart ssh
+~~~~
+
+### Install Virtualbox Guest Additions
+
+The Virtualbox Guest Addition allows for nice extras like shared folders, as well as a performance boost. Since the VB Guest Additions require a compiler, and Linux header files, let's first get the prerequisites installed:
+
+~~~~console
+sudo apt install gcc build-essential linux-headers-amd64
+~~~~
+
+Now head to the VirtualBox window menu and click the "Devices" option and choose "Insert Guest Additions CD Image" (note that you should download the latest version if Virtualbox asks[^1]). That will insert an ISO of the Guest Additions into our virtual machine's CDROM drive. We just need to mount it and run the Guest Additions Installer:
+
+~~~~console
+sudo mount /dev/cdrom /mnt
+cd /mnt
+sudo ./VBoxLinuxAdditions.run
+~~~~
+
+Assuming that finishes without error, you're done. Congratulations. Now you can add any extras you want your Debian 9 Vagrant base box to include. I primarily build things in Python with Django and Postgresql, so I always install packages like `postgresql`, `python3-dev`, `python3-pip`, `virtualenv`, and some other software I can't live without. Also edit the .bashrc file to create some aliases and helper scripts. Whatever you want all your future Vagrant boxes to have, now is the time to install it.
+
+### Packaging your Debian 9 Vagrant Box
+
+Before we package the box, we're going to zero out the drive to save a little space when we compress it down the road. Here's the commands to zero it out:
+
+~~~~console
+sudo dd if=/dev/zero of=/zeroed bs=1M
+sudo rm -f /zeroed
+~~~~
+
+Once that's done we can package up our box with this command:
+
+~~~~console
+vagrant package --base debian9-64base
+==> debian9-64base: Attempting graceful shutdown of VM...
+==> debian9-64base: Clearing any previously set forwarded ports...
+==> debian9-64base: Exporting VM...
+==> debian9-64base: Compressing package to: /home/lxf/vms/package.box
+~~~~
+
+As you can see from the output, I keep my Vagrant boxes in a folder call `vms`, you can put yours wherever you like. Wherever you decide to keep it, move it there now and cd into that folder so you can add the box. Sticking the `vms` folder I use, the commands would look like this:
+
+~~~console
+cd vms
+vagrant box add debian9-64 package.box
+~~~
+
+Now when you want to create a new vagrant box from this base box, all you need to do is add this to your Vagrantfile:
+
+~~~~console
+Vagrant.configure("2") do |config|
+ config.vm.box = "debian9-64"
+end
+~~~~
+
+Then you start up the box as you always would:
+
+~~~~console
+vagrant up
+vagrant ssh
+~~~~
+
+#####Shoulders stood upon
+
+* [Vagrant docs](https://www.vagrantup.com/docs/virtualbox/boxes.html)
+* [Engineyard's guide to Ubuntu](https://www.engineyard.com/blog/building-a-vagrant-box-from-start-to-finish)
+* [Customizing an existing box](https://scotch.io/tutorials/how-to-create-a-vagrant-base-box-from-an-existing-one) - Good for when you don't need more RAM/disk space, just some software pre-installed.
+
+[^1]: On Arch, using Virtualbox 6.x I have had problems downloading the Guest Additions. Instead I've been using the package `virtualbox-guest-iso`. Note that after you install that, you'll need to reboot to get Virtualbox to find it.
diff --git a/src/why-i-built-my-own-mailing-list-software.txt b/src/why-i-built-my-own-mailing-list-software.txt
new file mode 100644
index 0000000..b9877cf
--- /dev/null
+++ b/src/why-i-built-my-own-mailing-list-software.txt
@@ -0,0 +1,52 @@
+This is not a tutorial. If you don't already know how to write the code you need to run a mailing list, you probably shouldn't try to do it yourself. Still, I wanted to outline the reasons I built my own mailing list software in 2020, when there are dozens of commercial and open source projects that I could have used.
+
+At the core of my otherwise questionable decision is the notion that we ought to completely understand the core infrastructures in our lives. Why? Because it adds value and meaning to your life in the form of understanding. And that understand doesn't stop with the thing you understand either, it becomes part of you, you will find other places this understanding helps you.
+
+It's also just not that hard to do things yourself. It makes maintaining the system easier, and it often saves time (or money) in the long term.
+
+The only way to really understand a thing is to either build it yourself from scratch or completely disassemble it and put it back together.
+
+This is true for software as well as the rest of the world. I ripped all the electrical, propane, plumbing, and engine systems out of my home ([a 1969 RV](/1969-dodge-travco-motorhome)) because I needed to know how every single piece works, and how they all work together.
+
+I understand those systems now because I built them myself (with expert help when needed), and that makes maintaining them much easier. Otherwise I would always be dependant on someone else to keep my home running and that's no way to live.
+
+The same is true with software. If the software you're considering is a core part of your personal or business infrastructure, you need to understand every single part of it and how all those parts fit together.
+
+The question is, should you deconstruct an existing project or write your own from scratch? The answer depends on the situation, the right choice won't always be the same in every case. I do a mix a both and I'm sure most other people do too. There's no one right answer, which means you have to think things through in detail ahead of time.
+
+When I decided I wanted to [start a mailing list](/jrnl/2020/11/invitation), I looked around at the software that was available and very quickly realized that I had different goals than most mailing list software. That's when you should write your own.
+
+The available commercial software did not respect users privacy and did not allow me any control. There are some services that do provide a modicum of privacy for your subscribers, but you're going to be working against the software to enable it.
+
+*If you know of a dead simple commercial mailing list software that's built with user privacy in mind, please post a link in the comments, I'd love to have somewhere to point people. *
+
+I also wanted to be in complete control of the data. I host my own publishing systems. I consider myself a writer first, but publisher is a close second. What sort of publisher doesn't control their own publishing system?[^1] What makes email such a wonderful distributed publishing system is that no one owns the protocols that dictate how it works. That's great. I don't want to control the delivery mechanism, just the product at either end.
+
+Email is more or less the inverse of the web. You send a single copy to many readers, rather than many readers coming to a single copy as with a web page. The point is, there's no reason I can't create and host the original email here and send out the copies myself. The hard part -- creating the protocols and low-level tools that power email -- was taken care of decades ago.
+
+With that goal in mind I started looking at open source solutions. I use [Django](https://www.djangoproject.com) to publish what you're reading here, so I looked at some Django-based mailing list software. The two I considered most seriously were [Django Newsletter](https://django-newsletter.readthedocs.io/en/latest/) and [Emencia Django Newsletter](https://github.com/emencia/emencia-django-newsletter). I found a few other smaller projects as well, but those seem to be the big two in what's left of the Django universe.
+
+Those two, and some others influenced what I ended up writing in various ways, but none of them were quite what I wanted out of the box. Most of them still used some kind of tracking, whether a pixel embedded in the email or wrapping links with individual identifiers. I didn't want either of those things and stripping them out, while staying up-to-date with upstream changes would have been cumbersome. So, DIY then.
+
+But running a mail server is... difficult, risky, and probably going to keep you up at night. I tried it, briefly.
+
+One of the big problems with email is that, despite email being an open protocol, Google and other big corps are able to gain some control by using spam as a reason to tightly control who gets to send email[^2] That means if I just spin up a VPS at Vultr and try to send some emails with Postfix they're probably all going to end up in, best case, you Spam folder, but more likely they'd never be delivered.
+
+So while I wrote the publishing tools myself, host the newletter archive myself, designed everything about it myself, I handed off the sending to [Amazon's SES](https://aws.amazon.com/ses/), which has been around long enough, and is used by enough big names that mail sent through it isn't automatically deleted. It may possibly still end up in some Spam folders, but for the most part in my early testing (thank you to all my friends who helped out with that) that hasn't been an issue.
+
+In the end what I have is a fairly robust, loosely-joined system where I have control over the key elements and it's easy to swap out the sending mechanism down the road should I have problems, or just find something better (preferably something not owned by Amazon).
+
+###Was it Worth It?
+
+So far absolutely not. But I knew that when I started.
+
+I could have signed up for Mailchimp, picked some pre-made template, and spent the last year sending out newsletters to subscribers, and who knows, maybe I'd have tons of those by now. But that's okay, that was never the goal.
+
+I am and always have been playing a very long game when it comes to publishing. I am building a thing that I want to last the rest of my life and beyond if I can manage it.
+
+I am patient. I am not looking for a ton of readers, I am looking for the right readers. The sort of people who are in short supply these days, the sort of people who end up on a piece like this and actually read the whole thing. The people for whom signing up for Mailchimp would be too easy, too boring.
+
+I am looking for those who want some adventure in everything they do, the DIYer, the curious, the explorers, the misfits. There's more of us than most of us realize. If you're interested feel free to [join our club](/newsletter/friends).
+
+[^1]: Sadly, these days almost no publisher retains any control over their systems. They're all beholden to Google AMP, Facebook News, and whatever the flavor of year happens to be. A few of them are slowly coming around to the idea that it might be better to build their own audiences, which somehow passed for revolutionary in publishing today. But I digress.
+[^2]: Not to go too conspiracy theory here, but I suspect that Google and its ilk generate a fair bit of the spam themselves, and do nothing to prevent the rest precisely because it allows for this control. Which is not to say spam isn't a problem, just that it's a very *convenient* problem.