diff --git a/content/backup-strategy.md b/content/backup-strategy.md index 50fd091..601537d 100644 --- a/content/backup-strategy.md +++ b/content/backup-strategy.md @@ -84,9 +84,8 @@ sslcacertfile = /etc/ssl/certs/ca-certificates.crt ### Notes -I use Standard Notes to take notes and wrote the tool -[standardnotes-fs](https://github.com/tannercollin/standardnotes-fs) to mount my -notes as a file system to view and edit them as plain text files. +I use Standard Notes to take notes and wrote the tool [standardnotes-fs](https://github.com/tannercollin/standardnotes-fs) +to mount my notes as a file system to view and edit them as plain text files. I take weekly backups of the mounted file system on my media server with cron: @@ -131,9 +130,7 @@ in case Telegram disappears or my account gets banned. Saves the messages to a sqlite db Telegram includes a data export feature, but it can't be automated. Instead I -run the deprecated software -[telegram-export](https://github.com/expectocode/telegram-export) hourly with -cron: +run the deprecated software [telegram-export](https://github.com/expectocode/telegram-export) hourly with cron: ``` 0 * * * * bash -c 'timeout 50m /home/tanner/opt/telegram-export/env/bin/python -m telegram_export' > /var/log/telegramexport.log 2>&1 @@ -144,16 +141,12 @@ Hasn't corrupted the database yet. ### Phone -[Signal -Messenger](https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms&hl=en_CA&gl=US) -automatically exports a copy of my text messages database, and -[Aegis](https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis&hl=en_CA&gl=US) -allows me to export an encrypted JSON file of my two-factor authentication +[Signal Messenger](https://play.google.com/store/apps/details?id=org.thoughtcrime.securesms&hl=en_CA&gl=US) automatically exports a copy of my text messages database, and +[Aegis](https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis&hl=en_CA&gl=US) allows me to export an encrypted JSON file of my two-factor authentication codes. I mount my phone's internal storage as a file system on my desktop using -[adbfs-rootless](https://github.com/spion/adbfs-rootless). I then rsync the -files over to my media server: +[adbfs-rootless](https://github.com/spion/adbfs-rootless). I then rsync the files over to my media server: ``` $ ./adbfs ~/mntphone @@ -181,9 +174,8 @@ All the files will be included in the 1 TB hard drive backup rotations. ### Web Services -Web services that I run like [txt.t0.vc](https://txt.t0.vc) and -[QotNews](https://news.t0.vc) are backed up daily, weekly, and monthly depending -on how frequently the data changes. +Web services that I run like [txt.t0.vc](https://txt.t0.vc) and [QotNews](https://news.t0.vc) are backed up daily, weekly, +and monthly depending on how frequently the data changes. I run `rdiff-backup` on the remote server with cron: @@ -206,11 +198,9 @@ the `rdiff-backup --server` command for security. ### Protospace -I run a lot of services for [Protospace](https://protospace.ca/), my city's -makerspace. +I run a lot of services for [Protospace](https://protospace.ca/), my city's makerspace. -The member portal I wrote called [Spaceport](https://my.protospace.ca/) creates -an archive I download daily: +The member portal I wrote called [Spaceport](https://my.protospace.ca/) creates an archive I download daily: ``` 40 10 * * * wget --content-disposition \ @@ -220,8 +210,7 @@ an archive I download daily: https://api.my.protospace.ca/backup/ ``` -The website and [wiki](https://wiki.protospace.ca) that I sysadmin get -backed up weekly: +The website and [wiki](https://wiki.protospace.ca) that I sysadmin both get backed up weekly: ``` 0 12 * * 1 mysqldump --all-databases > /var/www/dump.sql @@ -229,9 +218,7 @@ backed up weekly: 20 12 * * 1 rdiff-backup /var/www pshostbak@remotebackup::/mnt/backup/remote/pshostbak/weekly/www/ ``` -The Protospace [Minecraft -server](http://games.protospace.ca:8123/?worldname=world&mapname=flat&zoom=3&x=74&y=64&z=354) -I run gets backed up daily: +The Protospace [Minecraft server](http://games.protospace.ca:8123/?worldname=world&mapname=flat&zoom=3&x=74&y=64&z=354) I run gets backed up daily: ``` 00 15 * * * date -Iseconds > /home/tanner/minecraft/backup_check.txt @@ -300,14 +287,11 @@ correctly. ## Rotating Hard Drives I rotate through 2.5" 1 TB hard drives each Saturday when I do a backup. They -are quite cheap at [$65 CAD](https://www.memoryexpress.com/Products/MX65194) -each so I can have a bunch floating around. - +are quite cheap at [$65 CAD](https://www.memoryexpress.com/Products/MX65194) each so I can have a bunch floating around. I keep one connected to the server, one in my bag, one offsite, one at my mother's house, and one at my dad's house. Every Saturday I run the script above -to take a copy and then swap the drive with the one in my bag. It then gets -I go back home about twice per year +to take a copy and then swap the drive with the one in my bag. It then gets I go back home about twice per year swapped when I visit my offsite location. Same for when I visit my parents. This means that all hard drives eventually get rotated through with new data and don't sit too long unpowered. diff --git a/content/bypassing-ports.md b/content/bypassing-ports.md index 05886f3..e3fe5a5 100644 --- a/content/bypassing-ports.md +++ b/content/bypassing-ports.md @@ -15,16 +15,15 @@ This article explains how I set it up and is targeted towards Linux sysadmins. ## Overview -I have a cheap $5 per month virtual server with [Digital -Ocean](https://digitalocean.com) that runs Debian GNU/Linux 10. An OpenVPN -server is running on this virtual server. +I have a cheap $5 per month virtual server with [Digital Ocean](https://digitalocean.com) that runs +Debian GNU/Linux 10. An OpenVPN server is running on this virtual server. My media server at home has an OpenVPN client connected to the server and is assigned a static IP on the VPN network. The virtual server has routing enabled and forwards inbound traffic __from the -internet__ to my media server at home. This allows me to have external HTTP and SSH -access. +internet__ to my media server at home. This allows me to have external HTTP and +SSH access. ## Server Setup @@ -41,8 +40,7 @@ $ sudo apt install openvpn ufw ### OpenVPN Server -These steps roughly follow [this -guide](https://wiki.debian.org/OpenVPN#TLS-enabled_VPN). +These steps roughly follow [this guide](https://wiki.debian.org/OpenVPN#TLS-enabled_VPN). Generate TLS certificates and keys: @@ -89,7 +87,8 @@ We make a `mediaserver` client because we want to assign a static IP to it. You need to make a different one for each client you want with a static IP. Also, if you want generic clients that all get dynamic IPs for use on your -laptop, phone, etc. to protect you from public WiFi (like a normal VPN), create only a single extra one: +laptop, phone, etc. to protect you from public WiFi (like a normal VPN), create +only a single extra one: ``` $ ./easyrsa build-client-full client nopass # optional @@ -136,7 +135,8 @@ $ sudo mkdir ccd $ sudo touch ccd/mediaserver ``` -Replace `mediaserver` with whatever client name you used above. Edit it like so: +Replace `mediaserver` with whatever client name you used above. Edit it like +so: Your home server will be `10.8.0.100` @@ -221,11 +221,11 @@ COMMIT Replace `123.123.123.123` with your VPN server's external IP address and `eth0` with the external interface. -This will forward TCP traffic on port 2222 to your home server. If you want to use -port 22, then you need to set the VPN SSH server to something else. +This will forward TCP traffic on port 2222 to your home server. If you want to +use port 22, then you need to set the VPN SSH server to something else. -A full example of `/etc/ufw/before.rules` with other ports included can be found -here: +A full example of `/etc/ufw/before.rules` with other ports included can be +found here: [https://txt.t0.vc/URUG](https://txt.t0.vc/URUG) @@ -248,7 +248,8 @@ $ sudo apt install openvpn ### Client Configs -For static IP clients (like your home server), create the config file `/etc/openvpn/client.conf`: +For static IP clients (like your home server), create the config file +`/etc/openvpn/client.conf`: ``` client @@ -288,7 +289,8 @@ $ sudo cat /etc/openvpn/easy-rsa/pki/ca.crt Also replace `vpn.example.com` with the subdomain you assigned earlier. -For device clients (like your laptop and phone), create the config file `client.ovpn`: +For device clients (like your laptop and phone), create the config file +`client.ovpn`: `redirect-gateway def1` forces traffic over the VPN diff --git a/content/images/wine/wine1.jpg b/content/images/wine/wine1.jpg new file mode 100644 index 0000000..55769b3 Binary files /dev/null and b/content/images/wine/wine1.jpg differ diff --git a/content/images/wine/wine2.jpg b/content/images/wine/wine2.jpg new file mode 100644 index 0000000..e091cd5 Binary files /dev/null and b/content/images/wine/wine2.jpg differ diff --git a/content/images/wine/wine3.jpg b/content/images/wine/wine3.jpg new file mode 100644 index 0000000..c002bf6 Binary files /dev/null and b/content/images/wine/wine3.jpg differ diff --git a/content/pages/creations.md b/content/pages/creations.md new file mode 100644 index 0000000..1d6db4e --- /dev/null +++ b/content/pages/creations.md @@ -0,0 +1,6 @@ +Title: Creations +Template: creations +Slug: z + + +Qot. diff --git a/content/pages/projects.md b/content/pages/projects.md new file mode 100644 index 0000000..7b82a71 --- /dev/null +++ b/content/pages/projects.md @@ -0,0 +1,6 @@ +Title: Projects +Template: projects +Slug: y + + +Qot. diff --git a/content/pages/text-files.md b/content/pages/text-files.md deleted file mode 100644 index 164b48e..0000000 --- a/content/pages/text-files.md +++ /dev/null @@ -1,6 +0,0 @@ -Title: Text Files -Template: text-files -Slug: x - - -Qot. diff --git a/content/pages/writing.md b/content/pages/writing.md new file mode 100644 index 0000000..a739a9a --- /dev/null +++ b/content/pages/writing.md @@ -0,0 +1,6 @@ +Title: Writing +Template: writing +Slug: x + + +Qot. diff --git a/content/wine-crate-coffee-table.md b/content/wine-crate-coffee-table.md new file mode 100644 index 0000000..0c8925d --- /dev/null +++ b/content/wine-crate-coffee-table.md @@ -0,0 +1,28 @@ +Title: Wine Crate Coffee Table +Date: 2018-09-12 +Category: Creations +Summary: A coffee table made out of wooden wine creates. +Short: 0 + +My close friend Odai saw a simple coffee table design online that was built out +of four wooden wine crates. They are quite cheap and available at any hardware +store. We each wanted to make one so went and bought eight crates and some +plywood to use as a base. + +We went to my local makerspace, Protospace, to build them in the wood shop. We +thought it would be a quick job only taking a few hours, but it turned out to be +a twelve hour job over a couple of days. At least we were in good company! + +![the table before staining. four box-like wine crates are on their sides and joined together in a spiral. a messy wood shop is in the background]({static}/images/wine/wine1.jpg) + +![the two tables after staining. one face is centred and the contrast between the dark stain and light wood grain shows.]({static}/images/wine/wine2.jpg) + +The wine crates were glued and then brad-nailed together. Extra wood was added +under the thin top strips for support. After the glue dried, the brad nails were +painstakingly removed because the ones we used were too long and stuck out. + +After being attached to the base, the entire table was sanded and then stained. +We let it dry overnight and returned the following day to add a quick layer of +varnish. + +![the table in my living room with blankets inside the wine crates and a plant pot in the centre growing a bonsai tree and a succulent]({static}/images/wine/wine3.jpg) diff --git a/pelicanconf_lite.py b/pelicanconf_lite.py index 78e0f23..655afd5 100644 --- a/pelicanconf_lite.py +++ b/pelicanconf_lite.py @@ -1,6 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import unicode_literals +import os AUTHOR = 'Tanner Collin' SITENAME = 'Tanner Collin' @@ -55,7 +56,14 @@ CATEGORIES_SAVE_AS = '' TAGS_SAVE_AS = '' INDEX_SAVE_AS = 'index.html' -ARTICLE_URL = '{date:%d}/' -ARTICLE_SAVE_AS = '{date:%d}/index.html' +ARTICLE_URL = '{short}/' +ARTICLE_SAVE_AS = '{short}/index.html' +PAGE_URL = '{slug}' +PAGE_SAVE_AS = '{slug}/index.html' + +def list_text_files(): + return sorted(os.listdir('./content/text')) + +JINJA_GLOBALS = {'list_text_files': list_text_files} PROD = False diff --git a/publishconf_lite.py b/publishconf_lite.py index ac47c8e..40643cf 100644 --- a/publishconf_lite.py +++ b/publishconf_lite.py @@ -56,7 +56,7 @@ CATEGORIES_SAVE_AS = '' TAGS_SAVE_AS = '' INDEX_SAVE_AS = 'index.html' -ARTICLE_URL = '{short}' +ARTICLE_URL = '{short}/' ARTICLE_SAVE_AS = '{short}/index.html' PAGE_URL = '{slug}' PAGE_SAVE_AS = '{slug}/index.html' diff --git a/themes/lite/templates/creations.html b/themes/lite/templates/creations.html new file mode 100644 index 0000000..1bc5cb1 --- /dev/null +++ b/themes/lite/templates/creations.html @@ -0,0 +1,21 @@ +{% extends "base.html" %} +{% block meta %} +{% endblock %} + +{% block style %} +{% endblock %} + +{% block content %} +Creations +========= + +Sometimes I create art or interactive tech. + +{% for article in articles if article.category.name == 'Creations' %} +{{ article.title }} + {{ article.summary | striptags }} + +{% endfor %} + +{% endblock %} + diff --git a/themes/lite/templates/index.html b/themes/lite/templates/index.html index b3572d7..fcce74b 100644 --- a/themes/lite/templates/index.html +++ b/themes/lite/templates/index.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% block content %} -Hi, I'm Tanner! I like home automation, bots, privacy, -Python, Debian, coffee, and makerspaces. +Hi, I'm Tanner! I like home automation, sensors, bots, +privacy, Python, Debian, coffee, and makerspaces. Please sign my Guest Book! @@ -22,20 +22,23 @@ Projects Notica* Spaceport* t0txt* -standardnotes-fs* +[more] * external link Creations {% for article in articles_page.object_list if article.category.name == 'Creations' %} +{% if loop.index <= 4 %} {{ article.title }} +{% endif %} {% endfor %} +[more] Writing {% for article in articles_page.object_list if article.category.name == 'Writing' %} {{ article.title }} {% endfor %} -[Text Files] +[more] {% endblock %} diff --git a/themes/lite/templates/projects.html b/themes/lite/templates/projects.html new file mode 100644 index 0000000..ffaa4a3 --- /dev/null +++ b/themes/lite/templates/projects.html @@ -0,0 +1,36 @@ +{% extends "base.html" %} +{% block meta %} +{% endblock %} + +{% block style %} +{% endblock %} + +{% block content %} +Projects +======== + +My main hobby is working on software projects. I typically design websites or +build tools that make my life easier. + +QotNews* - source code* + Hacker News, Reddit, Lobsters, and Tildes articles pre-rendered in reader mode. + Optimized for speed and distraction-free reading. + +Notica* - source code* + Send browser notifications from your terminal. No installation. No registration. + +Spaceport* - source code* + Makerspace members' portal for Calgary Protospace. It tracks membership, + courses, training, access cards, and more. + +t0txt* - source code* + Minimal command line pastebin. Allows you to upload text notes from a bash pipe + or web browser. + +standardnotes-fs* + A filesystem that mounts your Standard Notes account as a directory of text + files that you can edit. + +* external link +{% endblock %} + diff --git a/themes/lite/templates/text-files.html b/themes/lite/templates/text-files.html deleted file mode 100644 index f5fc7bf..0000000 --- a/themes/lite/templates/text-files.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "base.html" %} -{% block meta %} -{% endblock %} - -{% block style %} -{% endblock %} - -{% block content %} -