Compare commits
1 Commits
11aed1d41b
...
columns
Author | SHA1 | Date | |
---|---|---|---|
42698372ad |
11
content/.obsidian/app.json
vendored
@@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"spellcheck": true,
|
|
||||||
"autoPairBrackets": false,
|
|
||||||
"autoPairMarkdown": false,
|
|
||||||
"vimMode": true,
|
|
||||||
"useMarkdownLinks": false,
|
|
||||||
"attachmentFolderPath": "media",
|
|
||||||
"alwaysUpdateLinks": true,
|
|
||||||
"legacyEditor": false,
|
|
||||||
"promptDelete": false
|
|
||||||
}
|
|
4
content/.obsidian/appearance.json
vendored
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"theme": "moonstone",
|
|
||||||
"baseFontSize": 16
|
|
||||||
}
|
|
16
content/.obsidian/core-plugins.json
vendored
@@ -1,16 +0,0 @@
|
|||||||
[
|
|
||||||
"file-explorer",
|
|
||||||
"global-search",
|
|
||||||
"switcher",
|
|
||||||
"graph",
|
|
||||||
"backlink",
|
|
||||||
"page-preview",
|
|
||||||
"note-composer",
|
|
||||||
"command-palette",
|
|
||||||
"editor-status",
|
|
||||||
"markdown-importer",
|
|
||||||
"outline",
|
|
||||||
"word-count",
|
|
||||||
"open-with-default-app",
|
|
||||||
"file-recovery"
|
|
||||||
]
|
|
22
content/.obsidian/graph.json
vendored
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"collapse-filter": true,
|
|
||||||
"search": "",
|
|
||||||
"showTags": false,
|
|
||||||
"showAttachments": false,
|
|
||||||
"hideUnresolved": false,
|
|
||||||
"showOrphans": true,
|
|
||||||
"collapse-color-groups": true,
|
|
||||||
"colorGroups": [],
|
|
||||||
"collapse-display": true,
|
|
||||||
"showArrow": false,
|
|
||||||
"textFadeMultiplier": 0,
|
|
||||||
"nodeSizeMultiplier": 1,
|
|
||||||
"lineSizeMultiplier": 3.32478632478632,
|
|
||||||
"collapse-forces": true,
|
|
||||||
"centerStrength": 0.518713248970312,
|
|
||||||
"repelStrength": 10,
|
|
||||||
"linkStrength": 1,
|
|
||||||
"linkDistance": 250,
|
|
||||||
"scale": 0.9044367002205442,
|
|
||||||
"close": true
|
|
||||||
}
|
|
1
content/.obsidian/hotkeys.json
vendored
@@ -1 +0,0 @@
|
|||||||
{}
|
|
113
content/.obsidian/workspace
vendored
@@ -1,113 +0,0 @@
|
|||||||
{
|
|
||||||
"main": {
|
|
||||||
"id": "69e9da393623ab60",
|
|
||||||
"type": "split",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"id": "a52c87ba4e7df223",
|
|
||||||
"type": "leaf",
|
|
||||||
"state": {
|
|
||||||
"type": "markdown",
|
|
||||||
"state": {
|
|
||||||
"file": "About.md",
|
|
||||||
"mode": "source",
|
|
||||||
"source": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"direction": "vertical"
|
|
||||||
},
|
|
||||||
"left": {
|
|
||||||
"id": "3885f82c1ab72e1b",
|
|
||||||
"type": "split",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"id": "0e37795504669957",
|
|
||||||
"type": "tabs",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"id": "e5f5df16367f5f9a",
|
|
||||||
"type": "leaf",
|
|
||||||
"state": {
|
|
||||||
"type": "file-explorer",
|
|
||||||
"state": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "15b64333baa0fbc2",
|
|
||||||
"type": "leaf",
|
|
||||||
"state": {
|
|
||||||
"type": "search",
|
|
||||||
"state": {
|
|
||||||
"query": "json",
|
|
||||||
"matchingCase": false,
|
|
||||||
"explainSearch": false,
|
|
||||||
"collapseAll": false,
|
|
||||||
"extraContext": false,
|
|
||||||
"sortOrder": "alphabetical"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"direction": "horizontal",
|
|
||||||
"width": 300
|
|
||||||
},
|
|
||||||
"right": {
|
|
||||||
"id": "260bba8f76f307a9",
|
|
||||||
"type": "split",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"id": "21c556d6660f839b",
|
|
||||||
"type": "tabs",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"id": "528c8f9657044ea2",
|
|
||||||
"type": "leaf",
|
|
||||||
"state": {
|
|
||||||
"type": "backlink",
|
|
||||||
"state": {
|
|
||||||
"file": "About.md",
|
|
||||||
"collapseAll": false,
|
|
||||||
"extraContext": false,
|
|
||||||
"sortOrder": "alphabetical",
|
|
||||||
"showSearch": false,
|
|
||||||
"searchQuery": "",
|
|
||||||
"backlinkCollapsed": false,
|
|
||||||
"unlinkedCollapsed": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "79f3ff4100fe3ae6",
|
|
||||||
"type": "leaf",
|
|
||||||
"state": {
|
|
||||||
"type": "outline",
|
|
||||||
"state": {
|
|
||||||
"file": "About.md"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"currentTab": 1
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"direction": "horizontal",
|
|
||||||
"width": 300
|
|
||||||
},
|
|
||||||
"active": "a52c87ba4e7df223",
|
|
||||||
"lastOpenFiles": [
|
|
||||||
"About.md",
|
|
||||||
"media/Pasted image 20220701212211.png",
|
|
||||||
"media/fake-dog3.jpg",
|
|
||||||
"media/Pasted image 20220726153803.png",
|
|
||||||
"Acoustic Panels.md",
|
|
||||||
"QotNews.md",
|
|
||||||
"t0 Services.md",
|
|
||||||
"Linux Flavour.md",
|
|
||||||
"Sensors.md",
|
|
||||||
"Fake Dog.md"
|
|
||||||
]
|
|
||||||
}
|
|
@@ -1,24 +0,0 @@
|
|||||||
Title: About
|
|
||||||
Date: 2022-07-23
|
|
||||||
Category: Notes
|
|
||||||
Summary: About me and my website.
|
|
||||||
Short: a
|
|
||||||
Wide: true
|
|
||||||
|
|
||||||
<img class="floated" src="/media/me.jpg">
|
|
||||||
|
|
||||||
## Me
|
|
||||||
I was born in the early '90s and spent a lot of time growing up playing with computers and electricity. It eventually became my passion and lead to me getting a degree in electrical engineering with a minor in computer engineering. I then got into makerspaces and the maker movement: like-minded people getting together to build things for fun. Most of what I build is software because I can work on it from anywhere. When I build physical things they usually involve electricity as a means to allow software to interact with the world. I work in the home automation field and have spent a lot of time automating my own home.
|
|
||||||
|
|
||||||
### Uses
|
|
||||||
I do my computing on a ThinkPad X1 Carbon laptop running Debian GNU/Linux with GNOME. Most of my work is done over ssh because it allows me to pause or move to my desktop quickly and there's less risk of losing data. I edit text with Vim in Byobu (tmux) terminal sessions. I browse the web with Librewolf, a privacy fork of Firefox. I mainly communicate via Telegram Messenger or email.
|
|
||||||
|
|
||||||
I don't like tweaking or configuring settings so I try to leave things default unless something really annoys me or it improves my workflow greatly. It's easy to sink an infinite amount of time into optimizing your workflow and then die having made nothing.
|
|
||||||
|
|
||||||
## Website
|
|
||||||
There's two versions of this website, a main version at <https://tannercollin.com> and a lite version at <https://t0.vc>. The reason is because I found myself continually removing features from the main version for sport and to satisfy my millennial craving for minimalism. I was already running several [[t0 Services | services]] on t0.vc subdomains but had nothing on the main domain. So it's the perfect use for it and I can experiment to see how minimal I can take it.
|
|
||||||
|
|
||||||
### Colophon
|
|
||||||
I use the static site generator Pelican to build the websites from a folder of markdown documents which I edit with Obsidian in Vim mode. This makes writing content feel like taking notes, since media and internal links are taken care of. The two versions are simply different themes loaded by different Pelican configs. The output is uploaded to my host via rsync and served by Nginx.
|
|
||||||
|
|
||||||
You can find the [source code](https://git.tannercollin.com/tanner/personal-site) on my Gitea.
|
|
@@ -1,25 +0,0 @@
|
|||||||
Title: Theatre Acoustic Panels
|
|
||||||
Date: 2021-10-21
|
|
||||||
Category: Creations
|
|
||||||
Summary: Panels for acoustic treatment in my home theatre.
|
|
||||||
Short: 3
|
|
||||||
|
|
||||||
Acoustic treatment is one of the most overlooked aspects of home audio. There's no point in spending money on premium speakers if the room they are playing in has poor acoustics.
|
|
||||||
|
|
||||||
The primary purpose of acoustic panels is to reduce the reverberations caused by sound reflecting off the smooth walls of the theatre. The path of the reflected sound is a longer distance to your ear compared to the sound coming directly from the speaker. This causes the reflected sound to be delayed by the time it reaches your ear. The delayed signal interferes with itself, causing comb filtering which distorts the signal.
|
|
||||||
|
|
||||||
Acoustic panels are placed geometrically where the sound from the speakers would reflect off the wall to reach the listener's ears. The insulation inside the panels absorbs energy from the soundwave which reduces its volume and interference.
|
|
||||||
|
|
||||||
![[ panel1.jpg | twelve L-shaped corners of the panels stacked together leaning on a table saw in a wood shop]]
|
|
||||||
|
|
||||||
I made six frames in the wood shop of my local makerspace, [[Protospace]]. After cutting the 1x4" pine boards to length, I made a jig so I could quickly join them together with screws.
|
|
||||||
|
|
||||||
![[ panel2.jpg | a panel with insulation inside on the ground about to be wrapped with black fabric]]
|
|
||||||
|
|
||||||
I added 4" batts of Rockwool insulation into each frame after it was assembled. I then wrapped the frame with black speaker fabric and stapled it in place while trying to pull it taut.
|
|
||||||
|
|
||||||
I sat in my theatre while a friend slid a handheld mirror along the wall until I could see the middle of the speaker in its reflection. This told me the centre point of where to mount each panel because the reflected sound would take the same path to my ear.
|
|
||||||
|
|
||||||
<span class="aside">Four in the front, two in the back</span>
|
|
||||||
|
|
||||||
![[panel3.jpg | four black acoustic panels mounted on the walls in my home theatre]]
|
|
@@ -1,33 +0,0 @@
|
|||||||
Title: Fake Dog for Home Security
|
|
||||||
Date: 2022-06-27
|
|
||||||
Category: Creations
|
|
||||||
Summary: Fake dog barking for home security while on vacation.
|
|
||||||
Short: 7
|
|
||||||
|
|
||||||
I set up a fake dog that barks if my surveillance cameras are triggered while I'm out of town on vacation. It's a pair of computer speakers plugged into a Raspberry Pi, which is an inexpensive single-board computer. One speaker faces the front door and the other faces the side door.
|
|
||||||
|
|
||||||
When the front door camera is triggered my surveillance camera system sends a message to the Raspberry Pi. A simple program plays an audio clip of a big dog barking through the side speaker and then the front speaker. The change in speakers simulates a dog moving towards the front door. The opposite happens if the side door camera is triggered.
|
|
||||||
|
|
||||||
You can find the [source code](https://git.tannercollin.com/tanner/woof) on my Gitea.
|
|
||||||
|
|
||||||
![[fake-dog.jpg]]
|
|
||||||
|
|
||||||
## Technical Details
|
|
||||||
My surveillance cameras sit on a separate network without internet access and their RTSP streams are consumed by the Blue Iris NVR software running on a dedicated Windows box. When an object is detected moving through a defined area for certain cameras, Blue Iris is configured to send an MQTT message to the `iot/cameras` topic via the Mosquitto broker running on my media server.
|
|
||||||
|
|
||||||
A Python script kept alive by Supervisor runs on the Raspberry Pi and listens to the topic using the `asyncio-mqtt` module. It receives and tries to decode a JSON message like `{"serial": "SE-N-ZoneB"}`. If the camera's serial is found in a dict at the top of the script, the corresponding audio file is played using Pygame. Controlling which speaker barks is done by muting the left or right channel in the stereo audio file.
|
|
||||||
|
|
||||||
![[fake-dog2.png]]
|
|
||||||
## Future Improvements
|
|
||||||
The dog has a lot of false positives from the cameras being triggered by car headlights or small animals. This isn't a big deal since no one is home to hear it bark and it isn't loud enough for my neighbours to hear (I've asked). I would rather have a false positive than a false negative.
|
|
||||||
|
|
||||||
A huge improvement would be to combine the camera data with a physical trigger. A break beam sensor mounted on stair railings or an accelerometer mounted under the steps would work for this. But it would be annoying to mount, route power to, and harden for harsh Calgary winters. Perhaps the accelerometers are sensitive enough to mount inside, close to the entrances.
|
|
||||||
|
|
||||||
## Efficacy
|
|
||||||
According to [former burglars](https://news.t0.vc/TRMA), barking dogs and security cameras are some of the best deterrents to home invasions. The dog sounds fake to me, but I know it isn't real. I'm hoping that a rushing burglar won't spend time pondering if the barking is from an elaborate speaker setup and will just move on to a different house.
|
|
||||||
|
|
||||||
I previously caught a prowler who went into my backyard and tested my garage door handle to see if it was locked. He then broke into my neighbour's truck and garage after. He gets to have his face on my website:
|
|
||||||
|
|
||||||
![[fake-dog3.jpg]]
|
|
||||||
|
|
||||||
The extra peace of mind while I'm away is worth the evening it took to set up. It was very easy to make because I reused the code I wrote for [[Protospace]]'s PA system doorbell that you can find on [GitHub](https://github.com/protospace/doorbell). It operates similarly by playing an audio file based on which 433 MHz doorbell is pressed.
|
|
@@ -1,23 +0,0 @@
|
|||||||
Title: Garage Door Opener Hack
|
|
||||||
Date: 2021-12-26
|
|
||||||
Category: Creations
|
|
||||||
Summary: Hacking my garage door opener to work over Wifi.
|
|
||||||
Short: 5
|
|
||||||
|
|
||||||
In the quest to automate as much of my house as possible, I thought it would be useful to be able to remotely control my garage door from my home automation system. If I suspected that I forgot to close it while leaving, I could check in my security cameras and then close it from anywhere. It's nice having this peace of mind, even if it almost never happens.
|
|
||||||
|
|
||||||
Instead of reverse engineering the wireless protocol, cracking the encryption, and sending my own commands, I figured it would be much easier to hack the hardware. I cracked open a spare remote to find that it contained a basic PCB with simple tactile switches.
|
|
||||||
|
|
||||||
![[garage1.jpg | the six parts of the spare remote on my desk: metal clip, plastic buttons, battery, PCB, and two halves of the case]]
|
|
||||||
|
|
||||||
My plan was to solder an Arduino controlled relay in parallel with the button that toggled the garage door. I would also power the remote from the 3 V pin. I soldered four wires on to the appropriate pins.
|
|
||||||
|
|
||||||
![[garage2.jpg | a closeup of the green PCB with two wires soldered to the battery terminals and two to the button pins]]
|
|
||||||
|
|
||||||
I drilled a hole in the plastic case and routed the wires through it while reassembling the remote. It's connected to an Adafruit ESP8266 Arduino with a relay module shield.
|
|
||||||
|
|
||||||
The Arduino joins my isolated home automation Wifi network and connects over MQTT, a simple messaging protocol, to my automation server. When it receives a command over MQTT it toggles the relay on for a quarter of a second and then off, simulating a button press.
|
|
||||||
|
|
||||||
![[garage3.jpg | the completed system: an arduino with a white relay and wires leading to the reassembled garage door remote]]
|
|
||||||
|
|
||||||
Update: this system has been flawless for two months now. It's worked every time I've tried to toggle the door and has never opened by mistake.
|
|
@@ -1,19 +0,0 @@
|
|||||||
Title: Hand of Ozymandias
|
|
||||||
Date: 2012-03-23
|
|
||||||
Category: Creations
|
|
||||||
Summary: A withered hand I welded out of scrap metal.
|
|
||||||
Short: hand
|
|
||||||
|
|
||||||
I was visiting my cousins in Radium, BC and decided to learn stick welding at their shop. I wanted to create a sculpture, so with pieces of scrap metal I welded together this hand. The beads are far from perfect. Working with small pieces of rusted metal made it difficult.
|
|
||||||
|
|
||||||
![[hand1.jpg | a rusted hand welded together out of scrap square stock metal tubing]]
|
|
||||||
|
|
||||||
## The Name
|
|
||||||
|
|
||||||
One of my favourite poems is [Ozymandias](https://en.wikipedia.org/wiki/Ozymandias) by Percy Bysshe Shelley. It's about the inevitable complete decline of all rulers and the empires they build, however mighty in their time. This is the hand of Ozymandias sticking out from the sand, grasping for life after he has been reduced to dust.
|
|
||||||
|
|
||||||
## Construction
|
|
||||||
|
|
||||||
I eyeballed the joint angles and my cousin cut them to spec with an angle grinder. It was made in a machine shop with no real planning done ahead of time. In between welds, I used my own hand as a reference. Below is a picture of me adding a bead to it.
|
|
||||||
|
|
||||||
![[hand2.jpg | me welding the hand causing a very bright white light that washes out the photo]]
|
|
@@ -1,22 +0,0 @@
|
|||||||
Title: LED Dress
|
|
||||||
Date: 2016-03-18
|
|
||||||
Category: Creations
|
|
||||||
Summary: A dress made out of LEDs that twinkle like stars.
|
|
||||||
Short: 4
|
|
||||||
|
|
||||||
A friend of mine was attending a stars and constellations themed ball. She wanted to wear a dress that was lit up with LEDs acting as twinkling stars. Seven of the 28 stars are aligned to resemble the Big Dipper constellation and twinkle differently than the rest, which twinkle in a random pattern.
|
|
||||||
|
|
||||||
![[dress1.jpg | a girl wearing a blue dress with a number of LEDs shining through the fabric]]
|
|
||||||
|
|
||||||
## Construction
|
|
||||||
|
|
||||||
The LEDs came from that strip that was cut up and soldered together with very small wires. Each of the LEDs can be controlled individually.
|
|
||||||
|
|
||||||
![[dress2.jpg | the controller circuit board, and the string of soldered together LEDs]]
|
|
||||||
|
|
||||||
Twenty-one of the stars are light magenta in color and twinkle by fading randomly. The seven LEDs that form the Big Dipper continually scroll through a gradient of three colors. Instead of calculating the values of each color in the gradient as the program runs, a lookup table is used.
|
|
||||||
|
|
||||||
<video autoplay muted loop style="display:block; margin: 0 auto;">
|
|
||||||
<source src="{static}/media/dress3.mp4" type="video/mp4">
|
|
||||||
Your browser does not support the video tag.
|
|
||||||
</video>
|
|
@@ -1,23 +0,0 @@
|
|||||||
Title: Remote Control Light Switch
|
|
||||||
Date: 2014-10-09
|
|
||||||
Category: Creations
|
|
||||||
Summary: A device to toggle my lights remotely.
|
|
||||||
Short: remote
|
|
||||||
|
|
||||||
I wanted the ability to toggle my bedroom light remotely for convenience. I designed a circuit that allows me to control my light with any device that can load a webpage.
|
|
||||||
|
|
||||||
I still wanted to be able to control the light manually, so I bought a metallic face-plate and turned it into a capacitive touch sensor. The slightest touch anywhere on the plate is enough to toggle the light. I had to electrically isolate the metal screws from it because they screw into a grounded switch box.
|
|
||||||
|
|
||||||
![[light1.jpg | my custom light switch, a Raspberry Pi computer, and an old iPhone]]
|
|
||||||
|
|
||||||
## Function
|
|
||||||
|
|
||||||
I have a Raspberry Pi ($35 computer) on my home network that runs a web server. When you connect to it in your web browser, a page loads with buttons to turn the light on or off. When you press a button, the server executes a command that sends a message over Bluetooth to the light switch. The Bluetooth module in the wall receives this message and forwards it to the microcontroller, which processes it and toggles the relay. The whole circuit is also powered from mains by an AC-DC converter.
|
|
||||||
|
|
||||||
This entire process happens quicker than half a second, so it feels instant.
|
|
||||||
|
|
||||||
![[light2.jpg | the front side which has several electrical components]]
|
|
||||||
|
|
||||||
<span class="aside">Black stuff's liquid electrical tape</span>
|
|
||||||
|
|
||||||
![[light3.jpg | the back side which has wires soldered to connect all the components]]
|
|
@@ -1,74 +0,0 @@
|
|||||||
Title: Choosing a Linux Flavour
|
|
||||||
Date: 2020-10-31
|
|
||||||
Category: Writing
|
|
||||||
Summary: A recommendation on which flavour of Linux to run.
|
|
||||||
Wide: true
|
|
||||||
Short: linux
|
|
||||||
|
|
||||||
[TOC]
|
|
||||||
|
|
||||||
People often ask me which flavour of Linux they should install. In summary, choose Ubuntu if it's your first time. Once you are comfortable, install Debian the next time you need to install Linux.
|
|
||||||
|
|
||||||
I run Debian on my computers and servers.
|
|
||||||
|
|
||||||
## Linux Distributions
|
|
||||||
|
|
||||||
<span class="aside">Interjection: it's technically called GNU/Linux</span>
|
|
||||||
|
|
||||||
When people refer to the "flavour of Linux" they are talking about a Linux distribution (distro). It mostly describes what software is distributed in its software repository.
|
|
||||||
|
|
||||||
"A typical Linux distribution comprises a Linux kernel, GNU tools and libraries, additional software, documentation, a window system, a window manager, and a desktop environment." [Wikipedia]
|
|
||||||
|
|
||||||
The major Linux distros are practically all the same. If you master one it's easy to pick up the others. The main differences you'll run into are which tools you use to install new software, and the desktop environment, which is what all the windows and buttons look like.
|
|
||||||
|
|
||||||
I recommend two Linux distros, Debian and Ubuntu. Ubuntu is based off of Debian, so they are very similar.
|
|
||||||
|
|
||||||
## Pros of Debian
|
|
||||||
|
|
||||||
Debian is one of the oldest distros and many other distros are based off it. You can see a timeline visualization of all its derivatives here:
|
|
||||||
|
|
||||||
<https://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg>
|
|
||||||
|
|
||||||
This image is what originally convinced me to use Debian. Scroll down until you see it and zoom out so you grasp how many derivatives it has.
|
|
||||||
|
|
||||||
Debian is also non-commercial and requires that all software in its main repository is free and open source. This is important because that grants you the right to study, change, and distribute the software and source code to anyone and for any purpose. They also follow a strong social contract you can see here:
|
|
||||||
|
|
||||||
<https://www.debian.org/social_contract>
|
|
||||||
|
|
||||||
It's also a very stable Linux distro since they freeze all software features on each release. This makes it great for servers because nothing will break when it updates.
|
|
||||||
|
|
||||||
The main Raspberry Pi distro is nearly identical to Debian, so you'll also gain familiarity with it.
|
|
||||||
|
|
||||||
## Cons of Debian
|
|
||||||
|
|
||||||
Since Debian requires all its software to be free and open source, proprietary hardware drivers aren't included in its main repo. This can make installing Debian difficult if your hardware requires proprietary drivers. You'll need to use an installation image found here:
|
|
||||||
|
|
||||||
<https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/>
|
|
||||||
|
|
||||||
The fact that Debian freezes software features can also mean that your software gets old until the next Debian release. If you want versions that are bleeding edge, you'll need to use Debian Unstable as described here:
|
|
||||||
|
|
||||||
<https://wiki.debian.org/DebianUnstable#Installation>
|
|
||||||
|
|
||||||
Don't be fooled by the name "unstable". I use it for my personal computers and it runs fine.
|
|
||||||
|
|
||||||
## Pros of Ubuntu
|
|
||||||
|
|
||||||
Ubuntu is incredibly easy to install. You can also try it out before deciding to install it. The distro pretty much just works on what ever hardware you have.
|
|
||||||
|
|
||||||
It's very beginner friendly because it's so popular. Any problem you search for will reveal dozens of threads with people solving the same problem.
|
|
||||||
|
|
||||||
## Cons of Ubuntu
|
|
||||||
|
|
||||||
Unfortunately Ubuntu is developed by a commercial company, Canonical. The company's interests come first, before the users' and they have a track record of betraying their users' trust and privacy.
|
|
||||||
|
|
||||||
Years ago Ubuntu had a feature enabled by default that would send your desktop searches to Amazon so they could suggest products for you to buy:
|
|
||||||
|
|
||||||
<https://www.pcworld.com/article/2840401/ubuntus-unity-8-desktop-removes-the-amazon-search-spyware.html>
|
|
||||||
|
|
||||||
Currently whenever you remote login to your Ubuntu machine, it phones home to Canonical and they collect info about your system:
|
|
||||||
|
|
||||||
<https://ubuntu.com/legal/motd>
|
|
||||||
|
|
||||||
While these reasons are fairly minor, they are quite frowned upon in the Linux community and are reason enough to switch to Debian once you are comfortable with using Linux.
|
|
||||||
|
|
||||||
[Wikipedia]: https://en.wikipedia.org/wiki/Linux_distribution
|
|
@@ -1,21 +0,0 @@
|
|||||||
Title: Notica
|
|
||||||
Date: 2022-05-17
|
|
||||||
Category: Projects
|
|
||||||
Summary: Send browser notifications from your terminal. No installation. No registration.
|
|
||||||
Short: n
|
|
||||||
|
|
||||||
[Notica](https://notica.us) allows you to send browser notifications from your terminal to know when a slow command has finished running. It doesn't require installing anything or registering an account. It also works over ssh unlike `notify-send`.
|
|
||||||
|
|
||||||
You can find the [source code](https://github.com/tannercollin/Notica) on Github.
|
|
||||||
|
|
||||||
![[notica1.png]]
|
|
||||||
|
|
||||||
I do most of my work on remote servers over ssh. When running a slow command (like `apt install`) I'll distract myself by browsing sites like my other project [[QotNews]]. The command will finish running, but I'll still be wasting time reading news articles. Notica helps me stay on track by alerting me when the command finishes.
|
|
||||||
|
|
||||||
Example uses of Notica would be:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ sudo apt install freecad ; notica finished installing
|
|
||||||
|
|
||||||
$ rsync -av backup/ myserver:/mnt/backup/ ; notica done backup
|
|
||||||
```
|
|
@@ -1,30 +0,0 @@
|
|||||||
Title: Man's Reach Exceeds His Grasp
|
|
||||||
Date: 2012-04-11
|
|
||||||
Category: Creations
|
|
||||||
Summary: My first attempt at painting with acrylic.
|
|
||||||
Short: painting
|
|
||||||
|
|
||||||
The painting is called “Man’s Reach Exceeds His Grasp”. I've always wanted to try painting and thought I had a good idea, so after a couple of drawings I attempted to paint it. I eventually got it framed at Michaels. Many thanks to my friend Laura for the opportunity to do this, I couldn't have done it without her help.
|
|
||||||
|
|
||||||
![[painting1.jpg | a painting of water pouring out of a vase and into a hand, then turning to sand]]
|
|
||||||
|
|
||||||
## The Meaning
|
|
||||||
|
|
||||||
It’s hard to see in the photo, but the moment the water touches his hand it turns into sand and is taken by the slight breeze. The title is a quote from Andrea del Sarto, a poem by Robert Browning. It is also said by Nikola Tesla’s character in my favourite movie, [The Prestige](https://www.imdb.com/title/tt0482571/).
|
|
||||||
|
|
||||||
“I, painting from myself and to myself,
|
|
||||||
Know what I do, am unmoved by men’s blame
|
|
||||||
Or their praise either. Somebody remarks
|
|
||||||
Morello's outline there is wrongly traced,
|
|
||||||
His hue mistaken; what of that? or else,
|
|
||||||
Rightly traced and well ordered; what of that?
|
|
||||||
Speak as they please, what does the mountain care?
|
|
||||||
Ah, but a man’s reach should exceed his grasp,
|
|
||||||
Or what’s a heaven for?”
|
|
||||||
– Robert Browning from *Andrea del Sarto*
|
|
||||||
|
|
||||||
## Creation
|
|
||||||
|
|
||||||
I started with the background, trying to make it blurry and out of focus, then slowly progressed to the foreground. The hands were drawn in pencil and painted in. It was quite difficult to get the blending and shadows perfect, but I had Laura to tell me when things didn't look right. Below I am trying to figure out what a hand looks like in a mirror.
|
|
||||||
|
|
||||||
![[painting2.jpg | me looking at my own hand in the mirror as a guide]]
|
|
@@ -1,29 +0,0 @@
|
|||||||
Title: Automatic Plant Waterer
|
|
||||||
Date: 2014-06-05
|
|
||||||
Category: Creations
|
|
||||||
Summary: A device that automatically waters plants.
|
|
||||||
short: waterer
|
|
||||||
|
|
||||||
One day I decided watering my one plant was too much work, so I automated it. It's also great for when I'm on vacation. The plant is a year old now and doesn't look as good as it used to (kinda like you). So this machine is like its life support.
|
|
||||||
|
|
||||||
<span class="aside">Update: this plant died long ago</span>
|
|
||||||
|
|
||||||
![[waterer1.jpg | the device and pump on a 2L pop bottle with a tube running to a flowerpot]]
|
|
||||||
|
|
||||||
## First Attempt
|
|
||||||
|
|
||||||
The design was very simple and soldered together on perf board. A microcontroller turns the pump on for 20 seconds, then waits 24 hours and restarts. The pump ran way too fast so it was slowed down to 10% power.
|
|
||||||
|
|
||||||
This design suffered from a fatal problem. After running, there was a chance that the tube would stay full of fluid. If the water level in the pop bottle was too high, it could siphon out. I woke up with a flower pot overflowing with water a couple of times.
|
|
||||||
|
|
||||||
![[waterer2.jpg | a new version feeding into a different plant]]
|
|
||||||
|
|
||||||
## Second Attempt
|
|
||||||
|
|
||||||
I liked the idea so much that I made a second iteration. This one used a custom printed circuit board with a lot more features. The pumping duration could be adjusted with a screwdriver. This was useful as the plant (now a [Ming aralia](https://en.wikipedia.org/wiki/Polyscias_fruticosa)) grew.
|
|
||||||
|
|
||||||
Another feature was the ability to run the pump backwards. This completely eliminated the siphoning problem from before. After pumping for a set duration, it would run backwards until the tube was cleared of water.
|
|
||||||
|
|
||||||
<span class="aside">Also dead :(</span>
|
|
||||||
|
|
||||||
![[waterer3.jpg | the new version beside a big Ming aralia plant with bushy drooping leaves and skinny stems]]
|
|
@@ -1,55 +0,0 @@
|
|||||||
Title: Protospace
|
|
||||||
Date: 2022-05-01
|
|
||||||
Category: Writing
|
|
||||||
Summary: An outline of my projects at Calgary's makerspace Protospace.
|
|
||||||
Wide: true
|
|
||||||
Short: p
|
|
||||||
|
|
||||||
[Protospace](https://protospace.ca) is Calgary's original makerspace, a place where people go to make things and work on projects. It's a two-bay industrial shop with a full wood working area, metal working area, electronics lab, two laser cutters, five 3D printers, and sewing room. Members pay $55/month for 24/7 access to the facility and everyone is equal: Protospace has no owners and decisions are made by the membership.
|
|
||||||
|
|
||||||
![[protospace1.jpg | both Protospace bays, metal on the left and wood on the right]]
|
|
||||||
|
|
||||||
## Do-ocracy
|
|
||||||
|
|
||||||
The driving principle behind Protospace's success is do-ocracy. If you want to make a change and it would take fewer than four hours to revert, go ahead and do it. Under a do-ocracy people are encouraged to be bold and improve the space however they want. Larger changes and disagreements are decided at the next monthly members' meeting.
|
|
||||||
|
|
||||||
Under this system, I've created several projects in order to make Protospace a better place. I'll outline them here:
|
|
||||||
|
|
||||||
### Spaceport
|
|
||||||
|
|
||||||
[[Spaceport]] is our member portal and my main project at Protospace. It tracks memberships, transactions, courses, class attendance, access cards, and statistics about Protospace and its members.
|
|
||||||
|
|
||||||
It's free and open-source software. Everyone has the right to study, change, and distribute the software and source code to anyone and for any purpose. Here's a screenshot of the home page:
|
|
||||||
|
|
||||||
![[spaceport1.png | a screenshot of the homepage of Spaceport]]
|
|
||||||
|
|
||||||
### Garden
|
|
||||||
|
|
||||||
I set up a simple hydroponics garden in a broken medical lung testing chamber that someone donated to us. Some members have a hard time turning down free junk, and it sat upstairs for about a month in the classroom filled with lung testing equipment. I eventually got tired of looking at it so one night I gutted it and threw out all the internals.
|
|
||||||
|
|
||||||
A picture of the garden is taken every 5 minutes and uploaded to Spaceport. I'll eventually make a time lapse of the vegetable growth and plot a graph of the internal air temperature.
|
|
||||||
|
|
||||||
![[protospace-garden.jpg]]
|
|
||||||
|
|
||||||
### Telemetry
|
|
||||||
|
|
||||||
Telemetry is a catch-all project for random sensors and displays around Protospace.
|
|
||||||
|
|
||||||
- Two air quality and temperature sensors
|
|
||||||
- A web server for querying sensor data
|
|
||||||
- Alarm armed / disarmed sensor
|
|
||||||
- A script that detects who's logged into various computers
|
|
||||||
|
|
||||||
Here's a graph of the air quality on Spaceport:
|
|
||||||
|
|
||||||
![[protospace-dust.png]]
|
|
||||||
|
|
||||||
### Airlock
|
|
||||||
|
|
||||||
Airlock is our door lock controller. Vetted Protospace members are given key cards which they scan to access the building 24/7. Airlock periodically polls a list of valid card numbers from Spaceport and checks scans against that list. If a valid card number is scanned, a relay and electric latch is opened. The card number is also reported back to Spaceport so that it can keep a log of who scanned when.
|
|
||||||
|
|
||||||
### Doorbell
|
|
||||||
|
|
||||||
We have a doorbell because members who aren't yet vetted don't get a key card and can't scan into the building 24/7. Instead they have to use the doorbell to request entry into the building. Our normal wireless doorbell's chime isn't loud enough to hear throughout the space and you can't tell which door the person is at (front or back).
|
|
||||||
|
|
||||||
I used a software-defined radio to detect our wireless doorbell's signal and play a chime over the PA system throughout the entire space. A voice then says whether it was triggered by the front door or back door.
|
|
@@ -1,17 +0,0 @@
|
|||||||
Title: QotNews
|
|
||||||
Date: 2022-05-18
|
|
||||||
Category: Projects
|
|
||||||
Summary: Hacker News, Reddit, Lobsters, and Tildes articles pre-rendered in reader mode. Optimized for speed and distraction-free reading.
|
|
||||||
Short: q
|
|
||||||
|
|
||||||
[QotNews](https://news.t0.vc) is a news meta-aggregator. It gathers top articles from four news aggregators: Hacker News, Reddit, Lobsters, and Tildes along with their comments. The articles are then transformed into readable versions with consistent formatting and distractions removed. All articles in the main feed are preloaded by the client so they load instantly when clicked on.
|
|
||||||
|
|
||||||
You can find the [source code](https://git.tannercollin.com/tanner/qotnews) on my Gitea.
|
|
||||||
|
|
||||||
![[qotnews1.png]]
|
|
||||||
|
|
||||||
I tried to make QotNews the perfect news site for me. I easily get annoyed by cookie banners and distracted by visual clutter when reading normal news articles. I especially hate auto-playing videos and "download our app" popups. All articles have consistent styling that's easy to read:
|
|
||||||
|
|
||||||
![[qotnews2.png]]
|
|
||||||
|
|
||||||
It's by far my favourite project and has paid the most dividends for the amount of time I invested in programming it. I use it multiple times per day and it's become the main source of all my news. Since all the articles and comments are preloaded and saved in localStorage, it's also great for reading on airplanes.
|
|
@@ -1,17 +0,0 @@
|
|||||||
Title: Sensors
|
|
||||||
Date: 2022-05-24
|
|
||||||
Category: Notes
|
|
||||||
Summary: A dashboard for various sensors around my house.
|
|
||||||
Short: d
|
|
||||||
|
|
||||||
I wrote a custom [dashboard](https://sensors.dns.t0.vc/) to visualize data from various sensors around my house. I'm a huge fan of sensors because they're at the intersection of what I love: electronics, home automation, and data hoarding.
|
|
||||||
|
|
||||||
You can find the [source code](https://git.tannercollin.com/tanner/sensors) on my Gitea.
|
|
||||||
|
|
||||||
![[sensors1.png]]
|
|
||||||
|
|
||||||
Most of the data is captured by two cheap RTL-SDRs (software-defined radios) that are set to listen to 433 MHz and 915 MHz radio frequencies. I use the open-source project [rtl_433](https://github.com/merbanan/rtl_433) to automatically decode the signals and forward them to an MQTT broker, which is a messaging server that services can publish and subscribe to. Other sensors run an MQTT client directly or expose their data through other means like a web interface that I poll.
|
|
||||||
|
|
||||||
The data gets collected by a central Python script that process and stores it in an InfluxDB database for "efficient" storage. The script also runs a web server that queries the database and exposes the data over an API to the dashboard at various dates and ranges. The dashboard is written in JavaScript / React using a simple chart library.
|
|
||||||
|
|
||||||
My biggest regret was using InfluxDB. It's a stupid database and I wouldn't recommend it to anyone. The documentation is confusing and I ran into timezone issues with `group by time()`. It also assumes the column data type is an integer if your sensor happens to send it a whole number at first and it won't let you change that. Just stick to Postgres / SQLite.
|
|
@@ -1,15 +0,0 @@
|
|||||||
Title: Solar Car
|
|
||||||
Date: 2013-04-27
|
|
||||||
Category: Creations
|
|
||||||
Summary: About my time volunteering with the University of Calgary Solar Car Team, where I designed a maximum power point tracker.
|
|
||||||
Short: car
|
|
||||||
|
|
||||||
I joined the University of Calgary Solar Car Team in my first semester for a chance to learn things, gain practical experience, and meet people that share my interests. The car was the top Canadian team in a 3000 km race from Darwin to Adelaide, Australia in 2011. We met up at a shop on campus every Saturday morning to work on the new Generation IV of the solar car.
|
|
||||||
|
|
||||||
![[solar1.jpg | the MPPT device, a printed circuit board with bulky round electrical components held in my hand]]
|
|
||||||
|
|
||||||
## The Helianthus MPPT
|
|
||||||
|
|
||||||
I was in charge of designing and assembling the MPPTs (maximum power point trackers) for the new generation solar car. An MPPT extracts as much power out of the solar cells as possible. The solar array operates less efficiently without them. The Generation IV car, Schulich Delta (pictured below) uses seven of them: one per section of solar cells with similar lighting conditions. Andrei and I designed the MPPT above.
|
|
||||||
|
|
||||||
![[solar2.jpg | the solar car from an angle with a driver inside]]
|
|
@@ -1,35 +0,0 @@
|
|||||||
Title: Spaceport
|
|
||||||
Date: 2022-05-16
|
|
||||||
Category: Projects
|
|
||||||
Summary: Member portal for Calgary Protospace. It tracks dues, courses, training, access cards, and more.
|
|
||||||
Short: m
|
|
||||||
|
|
||||||
[Spaceport](https://my.protospace.ca) is the member portal that I wrote for [[Protospace]], a makerspace that I frequent in Calgary. It is by far my largest project and the one I've spent the most time on. It has a database of all our members and tracks their transactions like dues and training fees. It allows members to sign up for classes and our instructors to teach courses. It also manages the access cards that members use to get into the building.
|
|
||||||
|
|
||||||
You can find the [source code](https://github.com/Protospace/spaceport) on Github.
|
|
||||||
|
|
||||||
![[spaceport1.png]]
|
|
||||||
|
|
||||||
Spaceport is tightly coupled to Protospace and has many integrations:
|
|
||||||
|
|
||||||
- Syncs credentials to our AD controller for computer logins
|
|
||||||
- Manages AD group membership to restrict machine use
|
|
||||||
- Syncs credentials to our Discourse forum [Spacebar](https://forum.protospace.ca)
|
|
||||||
- Manages Discourse groups to restrict topic access
|
|
||||||
- Syncs credentials to our [MediaWiki](https://wiki.protospace.ca)
|
|
||||||
- Processes PayPal payment notifications
|
|
||||||
- Syncs valid member cards to our door controller Airlock
|
|
||||||
- Tracks training certifications for our tool lockouts
|
|
||||||
- Emails interested members when a class is scheduled
|
|
||||||
- Shows who's connected to our [Minecraft server](http://games.protospace.ca:8123/?worldname=world&mapname=flat&zoom=3&x=74&y=64&z=354)
|
|
||||||
- Tracks who's logged into our laser cutter and CNC router
|
|
||||||
- Tracks and bills for laser cutting time
|
|
||||||
- Shows if the building alarm is armed or disarmed
|
|
||||||
- Displays charts of various environmental sensors
|
|
||||||
- Displays a photo of our garden
|
|
||||||
|
|
||||||
![[spaceport2.png]]
|
|
||||||
|
|
||||||
As of writing this there's 234 current Protospace members and 1408 historical or inactive memberships that it manages. Data is stored in a 49 MB SQLite database which makes it easy to back up or sync with my development server. The back end is written in Django / Python and the front end is React / JavaScript with Semantic UI for the graphics.
|
|
||||||
|
|
||||||
Site data is automatically compressed and [[Backup Strategy | backed up]] daily by two members. The software is free and open-source and can be set up by reading the documentation. Protospace directors also have admin access to the server's host in case something happens to me.
|
|
@@ -1,48 +0,0 @@
|
|||||||
Title: Things I Recommend
|
|
||||||
Date: 2022-06-24
|
|
||||||
Category: Writing
|
|
||||||
Summary: Software and products that I recommend you use.
|
|
||||||
Wide: true
|
|
||||||
Short: 1
|
|
||||||
|
|
||||||
This outlines some software and devices I recommend you use: uBlock Origin, Sponsorblock, Aegis Authenticator, ThruNite T1 flashlights, Logitech G Pro Wireless mice, and ThinkPad Laptops. Nothing here was sponsored.
|
|
||||||
|
|
||||||
[TOC]
|
|
||||||
|
|
||||||
## Software
|
|
||||||
### uBlock Origin
|
|
||||||
uBlock Origin is an open source ad blocker and something I install immediately on all my devices. Running an ad blocker makes browsing the web way better. It removes distracting ads (even from YouTube), invasive tracking, and makes you safer by removing potentially [fake links](https://news.t0.vc/LOBW/c#drekipus1657325184). It's the best piece of software I use even though it mostly remains unseen. And it even works on your phone.
|
|
||||||
|
|
||||||
You can install it on [Firefox Desktop](https://addons.mozilla.org/en-CA/firefox/addon/ublock-origin/), [Firefox Android](https://addons.mozilla.org/en-CA/android/addon/ublock-origin/), and [Chrome Desktop](https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en). Make sure you install the correct "Origin" version and avoid "ublock.org".
|
|
||||||
|
|
||||||
### SponsorBlock
|
|
||||||
SponsorBlock automatically skips over sponsored segments in YouTube videos. Not YouTube ads (that's what uBlock Origin is for), but the actual parts of the video sponsored by companies to advertise their products. It uses a crowd-sourced database of timestamps to seamlessly jump over those parts. It also allows you to skip to the highlight of some videos by pressing "enter" so you aren't wasting time watching exposition.
|
|
||||||
|
|
||||||
You can install it on [Firefox Desktop](https://addons.mozilla.org/en-CA/firefox/addon/sponsorblock/) and [Chrome Desktop](https://chrome.google.com/webstore/detail/sponsorblock-for-youtube/mnjggcdmjocbbbhaepdhchncahnbgone?hl=en).
|
|
||||||
|
|
||||||
![[recommend1.png]]
|
|
||||||
|
|
||||||
![[recommend2.png]]
|
|
||||||
|
|
||||||
### Aegis Authenticator
|
|
||||||
Aegis is a two-factor authenticator (2fa) app for Android that's free and open source. The killer feature and why I recommend it is that it supports automatic encrypted backups of the database in JSON format. You can unlock the app with a password or optional fingerprint. It supported true OLED dark mode. An alternative app is andOTP but there were [problems](https://news.t0.vc/EQYR/c#williamwchuang1553266688) with the backups' encryption back when I switched to Aegis.
|
|
||||||
|
|
||||||
Enabling 2fa on your accounts is essential for security, especially preventing credential stuffing attacks. Backing up your 2fa data is important in case you lose your phone. It saves you having to dig out recovery codes or try and convince someone that you own the account.
|
|
||||||
|
|
||||||
You can install it on Android via the [Play Store](https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis) or [F-Droid](https://f-droid.org/en/packages/com.beemdevelopment.aegis).
|
|
||||||
|
|
||||||
## Devices
|
|
||||||
### ThruNite T1 Flashlight
|
|
||||||
This is a tiny rechargeable flashlight that can output 1500 lumens, enough to hurt your eyes if you look directly into it. It has a magnet on the back to stick to things and an optional pocket-hat clip. I liked it so much I've bought three of them and gave one to a friend who then bought himself a couple more.
|
|
||||||
|
|
||||||
![[recommend3.png]]
|
|
||||||
|
|
||||||
### Logitech G Pro Wireless Mice
|
|
||||||
I've used a lot of wireless mice, and this one is by far my favourite. It has a USB dongle which I prefer because Bluetooh pairing annoys me. If you disable the LEDs the battery lasts for a few weeks of solid usage.
|
|
||||||
|
|
||||||
I like it so much that I own five of them: one for my office desk, nook desk, laptop bag, home theatre, and surveillance cameras NVR. I leave the last one plugged in so that when a mouse battery dies, I can swap it with a fully charged mouse that's ready to go. It also ensures they wear at a somewhat even rate.
|
|
||||||
|
|
||||||
### ThinkPad Laptops
|
|
||||||
I've had several different laptops over the years and have settled on buying ThinkPads going forward. I hate Lenovo as company because of their [Superfish scandal](https://en.wikipedia.org/wiki/Superfish#Lenovo_security_incident), but I can't deny that ThinkPads are absolutely solid. I currently own a ThinkPad X1 Carbon 6th Gen.
|
|
||||||
|
|
||||||
A lot of Linux developers use ThinkPads which means Linux is well supported on them and the drivers just work. The laptops are easy to pop open and service. Many parts are user-replaceable. My laptop charges off a small USB-C phone charger that I carry around. In a state of sickness-induced exhaustion, I spilled an entire glass of Gatorade on it and then drenched it in water to try and flush it away. I took the back off, drained it, and then pointed a fan at it for 24 hours. The laptop was working fine the next day.
|
|
@@ -1,19 +0,0 @@
|
|||||||
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!
|
|
||||||
|
|
||||||
![[wine1.jpg | 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]]
|
|
||||||
|
|
||||||
![[wine2.jpg | the two tables after staining. one face is centred and the contrast between the dark stain and light wood grain shows.]]
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
![[wine3.jpg | 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]]
|
|
@@ -3,38 +3,52 @@ Date: 2021-04-08
|
|||||||
Category: Writing
|
Category: Writing
|
||||||
Summary: Details about the backup system for all of my data.
|
Summary: Details about the backup system for all of my data.
|
||||||
Wide: true
|
Wide: true
|
||||||
Short: backup
|
|
||||||
|
|
||||||
[TOC]
|
[TOC]
|
||||||
|
|
||||||
Regularly backing up all the data I care about is very important to me. This article outlines my strategy to make sure I never lose essential data.
|
Regularly backing up all the data I care about is very important to me. This
|
||||||
|
article outlines my strategy to make sure I never lose essential data.
|
||||||
|
|
||||||
## Motivation
|
## Motivation
|
||||||
|
|
||||||
Backups should be as automatic as possible. This ensures laziness and forgetfulness won't interfere with the regularity.
|
Backups should be as automatic as possible. This ensures laziness and
|
||||||
|
forgetfulness won't interfere with the regularity.
|
||||||
|
|
||||||
All software used to create and store the backups should be free and open source so I'm not depending on the survival of a company.
|
All software used to create and store the backups should be free and open source
|
||||||
|
so I'm not depending on the survival of a company.
|
||||||
|
|
||||||
Backups need to be tested to ensure they are correct and happening regularly. Multiple copies of the backups should exist, including at least one offsite to protect against my building burning down.
|
Backups need to be tested to ensure they are correct and happening regularly.
|
||||||
|
Multiple copies of the backups should exist, including at least one offsite to
|
||||||
|
protect against my building burning down.
|
||||||
|
|
||||||
Backups should also be incremental when possible (rather than mirror copies) so an accidental deletion isn't propagated into the backups, making the file irrecoverable.
|
Backups should also be incremental when possible (rather than mirror copies) so
|
||||||
|
an accidental deletion isn't propagated into the backups, making the file
|
||||||
|
irrecoverable.
|
||||||
|
|
||||||
## Strategy
|
## Strategy
|
||||||
The key is to have one central location that all your files, projects, and data are cloned to and then back that directory up to multiple locations.
|
|
||||||
|
|
||||||
I have one backup folder `/mnt/backup` on my media server at home that serves as the destination for all my backup sources. All scheduled automatic backups write to their own subfolder inside of it.
|
I have one backup folder `/mnt/backup` on my media server at home that serves as
|
||||||
|
the destination for all my backup sources. All scheduled automatic backups write
|
||||||
|
to their own subfolder inside of it.
|
||||||
|
|
||||||
This backup folder is then synced to encrypted 2.5" 1 TB hard drives which I rotate between my bag, offsite, and my parents' house.
|
This backup folder is then synced to encrypted 2.5" 1 TB hard drives which I
|
||||||
|
rotate between my bag, offsite, and my parents' house.
|
||||||
|
|
||||||
## Backup Sources
|
## Backup Sources
|
||||||
|
|
||||||
I use the tool `rdiff-backup` extensively because it allows me to take incremental backups locally or over SSH. It acts very similar to `rsync` and has no configuration.
|
I use the tool `rdiff-backup` extensively because it allows me to take
|
||||||
|
incremental backups locally or over SSH. It acts very similar to `rsync` and has
|
||||||
|
no configuration.
|
||||||
|
|
||||||
### Email
|
### Email
|
||||||
|
|
||||||
I have every email since 2010 backed up continuously in case my email provider disappears.
|
I have every email since 2010 backed up continuously in case my email provider
|
||||||
|
disappears.
|
||||||
|
|
||||||
I use `offlineimap` to sync my mail to the directory `~/email` on my media server as a Maildir. Since offlineimap is only a syncing tool, the emails need to be copied elsewhere to be backed up. I run `rdiff-backup` from a weekly cron job:
|
I use `offlineimap` to sync my mail to the directory `~/email` on my media
|
||||||
|
server as a Maildir. Since offlineimap is only a syncing tool, the emails need
|
||||||
|
to be copied elsewhere to be backed up. I run `rdiff-backup` from a weekly cron
|
||||||
|
job:
|
||||||
|
|
||||||
<span class="aside">I'll explain what backup_check.txt does below</span>
|
<span class="aside">I'll explain what backup_check.txt does below</span>
|
||||||
|
|
||||||
@@ -69,7 +83,9 @@ sslcacertfile = /etc/ssl/certs/ca-certificates.crt
|
|||||||
|
|
||||||
### Notes
|
### 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:
|
I take weekly backups of the mounted file system on my media server with cron:
|
||||||
|
|
||||||
@@ -80,7 +96,9 @@ I take weekly backups of the mounted file system on my media server with cron:
|
|||||||
|
|
||||||
### Nextcloud
|
### Nextcloud
|
||||||
|
|
||||||
I self-host a Nextcloud instance to store all my personal documents (non-code projects, tax forms, spreadsheets, etc.). Since it's only a syncing software, the files need to be copied elsewhere to be backed up.
|
I self-host a Nextcloud instance to store all my personal documents (non-code
|
||||||
|
projects, tax forms, spreadsheets, etc.). Since it's only a syncing software,
|
||||||
|
the files need to be copied elsewhere to be backed up.
|
||||||
|
|
||||||
I take weekly backups of the Nextcloud data folder with cron:
|
I take weekly backups of the Nextcloud data folder with cron:
|
||||||
|
|
||||||
@@ -91,7 +109,9 @@ I take weekly backups of the Nextcloud data folder with cron:
|
|||||||
|
|
||||||
### Gitea
|
### Gitea
|
||||||
|
|
||||||
I self-host a Gitea instance to store all my git repositories for code-based projects. My home folder is also a git repo so I can easily sync my config files and password database between servers and machines.
|
I self-host a Gitea instance to store all my git repositories for code-based
|
||||||
|
projects. My home folder is also a git repo so I can easily sync my config files
|
||||||
|
and password database between servers and machines.
|
||||||
|
|
||||||
I take weekly backups of the Gitea data folder with cron:
|
I take weekly backups of the Gitea data folder with cron:
|
||||||
|
|
||||||
@@ -103,23 +123,36 @@ I take weekly backups of the Gitea data folder with cron:
|
|||||||
|
|
||||||
### Telegram
|
### Telegram
|
||||||
|
|
||||||
Telegram Messenger is my main app for communication. My parents, most of my friends, and friend groups are on there so I don't want to lose those messages in case Telegram disappears or my account gets banned.
|
Telegram Messenger is my main app for communication. My parents, most of my
|
||||||
|
friends, and friend groups are on there so I don't want to lose those messages
|
||||||
|
in case Telegram disappears or my account gets banned.
|
||||||
|
|
||||||
<span class="aside">Saves the messages to a sqlite db</span>
|
<span class="aside">Saves the messages to a sqlite db</span>
|
||||||
|
|
||||||
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:
|
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:
|
||||||
|
|
||||||
```
|
```
|
||||||
0 * * * * bash -c 'timeout 50m /home/tanner/opt/telegram-export/env/bin/python -m telegram_export' > /var/log/telegramexport.log 2>&1
|
0 * * * * bash -c 'timeout 50m /home/tanner/opt/telegram-export/env/bin/python -m telegram_export' > /var/log/telegramexport.log 2>&1
|
||||||
```
|
```
|
||||||
|
|
||||||
It likes to hang, so `timeout` kills it if it's still running after 50 minutes. Hasn't corrupted the database yet.
|
It likes to hang, so `timeout` kills it if it's still running after 50 minutes.
|
||||||
|
Hasn't corrupted the database yet.
|
||||||
|
|
||||||
### Phone
|
### 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 codes.
|
[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:
|
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 ~/mntphone
|
$ ./adbfs ~/mntphone
|
||||||
@@ -133,17 +166,23 @@ $ time rsync -Wav \
|
|||||||
localmediaserver:/mnt/backup/files/phone/
|
localmediaserver:/mnt/backup/files/phone/
|
||||||
```
|
```
|
||||||
|
|
||||||
Unfortunately this is a manual process because I need to plug my phone in each time. Ideally it would happen automatically while I'm asleep and the phone is charging.
|
Unfortunately this is a manual process because I need to plug my phone in each
|
||||||
|
time. Ideally it would happen automatically while I'm asleep and the phone is
|
||||||
|
charging.
|
||||||
|
|
||||||
### Miscellaneous Files
|
### Miscellaneous Files
|
||||||
|
|
||||||
The directory `/backup/files` is a repository for any kind of files I want to keep forever. My phone data, old archives, computer files, Minecraft worlds, files from previous jobs, and so on.
|
The directory `/backup/files` is a repository for any kind of files I want to
|
||||||
|
keep forever. My phone data, old archives, computer files, Minecraft worlds,
|
||||||
|
files from previous jobs, and so on.
|
||||||
|
|
||||||
All the files will be included in the 1 TB hard drive backup rotations.
|
All the files will be included in the 1 TB hard drive backup rotations.
|
||||||
|
|
||||||
### Web Services
|
### Web Services
|
||||||
|
|
||||||
Web services that I run like [[t0 Services]] and [[QotNews]] 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:
|
I run `rdiff-backup` on the remote server with cron:
|
||||||
|
|
||||||
@@ -160,13 +199,17 @@ I run `rdiff-backup` on the remote server with cron:
|
|||||||
55 14 1 * * rdiff-backup --remove-older-than 12B --force tbotbak@remotebackup::/mnt/backup/remote/tbotbak/monthly/t0txt/
|
55 14 1 * * rdiff-backup --remove-older-than 12B --force tbotbak@remotebackup::/mnt/backup/remote/tbotbak/monthly/t0txt/
|
||||||
```
|
```
|
||||||
|
|
||||||
The `tbotbak` user has write access to the `/mnt/backup/remote/tbotbak` directory only. It has its own passwordless SSH key that's only permitted to run the `rdiff-backup --server` command for security.
|
The `tbotbak` user has write access to the `/mnt/backup/remote/tbotbak`
|
||||||
|
directory only. It has its own passwordless SSH key that's only permitted to run
|
||||||
|
the `rdiff-backup --server` command for security.
|
||||||
|
|
||||||
### Protospace
|
### Protospace
|
||||||
|
|
||||||
I run a lot of services for [[Protospace]], 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]] 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 \
|
40 10 * * * wget --content-disposition \
|
||||||
@@ -176,7 +219,8 @@ The member portal I wrote called [[Spaceport]] creates an archive I download dai
|
|||||||
https://api.my.protospace.ca/backup/
|
https://api.my.protospace.ca/backup/
|
||||||
```
|
```
|
||||||
|
|
||||||
The website and [wiki](https://wiki.protospace.ca) that I sysadmin both get backed up weekly:
|
The website and [wiki](https://wiki.protospace.ca) that I sysadmin get
|
||||||
|
backed up weekly:
|
||||||
|
|
||||||
```
|
```
|
||||||
0 12 * * 1 mysqldump --all-databases > /var/www/dump.sql
|
0 12 * * 1 mysqldump --all-databases > /var/www/dump.sql
|
||||||
@@ -184,7 +228,9 @@ The website and [wiki](https://wiki.protospace.ca) that I sysadmin both get back
|
|||||||
20 12 * * 1 rdiff-backup /var/www pshostbak@remotebackup::/mnt/backup/remote/pshostbak/weekly/www/
|
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
|
00 15 * * * date -Iseconds > /home/tanner/minecraft/backup_check.txt
|
||||||
@@ -224,7 +270,8 @@ My backup folder `/mnt/backup` now looks like this:
|
|||||||
└── telebak
|
└── telebak
|
||||||
```
|
```
|
||||||
|
|
||||||
This directory tree is the master backup and I make a copy of the entire tree every Saturday to a hard drive.
|
This directory tree is the master backup and I make a copy of the entire tree
|
||||||
|
every Saturday to a hard drive.
|
||||||
|
|
||||||
The directory is copied over with the following script:
|
The directory is copied over with the following script:
|
||||||
|
|
||||||
@@ -244,17 +291,32 @@ umount /mnt/external
|
|||||||
cryptsetup luksClose external
|
cryptsetup luksClose external
|
||||||
```
|
```
|
||||||
|
|
||||||
I wrote a Python script `checkbackup.py` that goes through each backup and compares the timestamp in `backup_check.txt` files to the current time. This makes sure that the cron ran, backups were taken, and transferred over correctly.
|
I wrote a Python script `checkbackup.py` that goes through each backup and
|
||||||
|
compares the timestamp in `backup_check.txt` files to the current time. This
|
||||||
|
makes sure that the cron ran, backups were taken, and transferred over
|
||||||
|
correctly.
|
||||||
|
|
||||||
## Rotating Hard Drives
|
## 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.
|
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.
|
||||||
|
|
||||||
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 <span class="aside">I go back home about twice per year</span> 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.
|
|
||||||
|
|
||||||
The drives are all encrypted with full-disk LUKS encryption using a password I'm unlikely to forget.
|
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
|
||||||
|
<span class="aside">I go back home about twice per year</span>
|
||||||
|
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.
|
||||||
|
|
||||||
I run the check-summing `btrfs` file system on them in RAID-1 to protect against bitrot. This means I can only use 0.5 TB of storage for my backups, but the data is stored redundantly.
|
The drives are all encrypted with full-disk LUKS encryption using a password I'm
|
||||||
|
unlikely to forget.
|
||||||
|
|
||||||
|
I run the check-summing `btrfs` file system on them in RAID-1 to protect against
|
||||||
|
bitrot. This means I can only use 0.5 TB of storage for my backups, but the data
|
||||||
|
is stored redundantly.
|
||||||
|
|
||||||
Here's how I set up new hard drives to do this:
|
Here's how I set up new hard drives to do this:
|
||||||
|
|
||||||
@@ -270,8 +332,12 @@ $ sudo cryptsetup luksClose external
|
|||||||
|
|
||||||
## Future Improvements
|
## Future Improvements
|
||||||
|
|
||||||
I'm working on a system to automatically back up all my home directories to my media server. I need this to grab Bash histories and code that's work-in-progress. I've been burned by not having this once when a server died.
|
I'm working on a system to automatically back up all my home directories to my
|
||||||
|
media server. I need this to grab Bash histories and code that's
|
||||||
|
work-in-progress. I've been burned by not having this once when a server died.
|
||||||
|
|
||||||
I'd like to automate backing up my phone by connecting it to a Raspberry Pi when I go to sleep.
|
I'd like to automate backing up my phone by connecting it to a Raspberry Pi when
|
||||||
|
I go to sleep.
|
||||||
|
|
||||||
I need to get better at fully testing my backups by restoring them on a blank machine.
|
I need to get better at fully testing my backups by restoring them on a blank
|
||||||
|
machine.
|
@@ -3,25 +3,33 @@ Date: 2021-04-10
|
|||||||
Category: Writing
|
Category: Writing
|
||||||
Summary: Bypass ISP blocked ports using VPN port forwarding for public access.
|
Summary: Bypass ISP blocked ports using VPN port forwarding for public access.
|
||||||
Wide: true
|
Wide: true
|
||||||
Short: 2
|
|
||||||
|
|
||||||
[TOC]
|
[TOC]
|
||||||
|
|
||||||
My residential ISP blocks inbound traffic to common ports like 22, 80, and 443. I use an OpenVPN tunnel to forward these ports so that I can self-host a public media server. It does __not__ require users to be on the VPN.
|
My residential ISP blocks inbound traffic to common ports like 22, 80, and 443.
|
||||||
|
I use an OpenVPN tunnel to forward these ports so that I can self-host a
|
||||||
|
public media server. It does __not__ require users to be on the VPN.
|
||||||
|
|
||||||
This article explains how I set it up and is targeted towards Linux sysadmins.
|
This article explains how I set it up and is targeted towards Linux sysadmins.
|
||||||
|
|
||||||
## Overview
|
## 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.
|
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.
|
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.
|
||||||
|
|
||||||
## Server Setup
|
## Server Setup
|
||||||
|
|
||||||
Spin up a Debian 10 virtual server on your favourite hosting provider and set your user up as you would normally. You should probably harden this server. Assign a subdomain to it like `vpn.example.com`.
|
Spin up a Debian 10 virtual server on your favourite hosting provider and set
|
||||||
|
your user up as you would normally. You should probably harden this server.
|
||||||
|
Assign a subdomain to it like `vpn.example.com`.
|
||||||
|
|
||||||
Install the following requirements:
|
Install the following requirements:
|
||||||
|
|
||||||
@@ -32,7 +40,8 @@ $ sudo apt install openvpn ufw
|
|||||||
|
|
||||||
### OpenVPN Server
|
### 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:
|
Generate TLS certificates and keys:
|
||||||
|
|
||||||
@@ -43,7 +52,7 @@ $ sudo make-cadir easy-rsa/
|
|||||||
$ sudo chown -R tanner:tanner easy-rsa/
|
$ sudo chown -R tanner:tanner easy-rsa/
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace `tanner` with your Linux username, this is temporary.
|
Replace `tanner` with your own username, this is temporary.
|
||||||
|
|
||||||
<span class="aside">The `.rnd` file prevents a warning</span>
|
<span class="aside">The `.rnd` file prevents a warning</span>
|
||||||
|
|
||||||
@@ -54,7 +63,8 @@ $ head /dev/urandom > pki/.rnd
|
|||||||
$ ./easyrsa build-ca
|
$ ./easyrsa build-ca
|
||||||
```
|
```
|
||||||
|
|
||||||
Enter a password you won't forget in case you want to add another client later. The Common Name you choose is not important.
|
Enter a password you won't forget in case you want to add another client later.
|
||||||
|
The Common Name you choose is not important.
|
||||||
|
|
||||||
Generate Diffie–Hellman params:
|
Generate Diffie–Hellman params:
|
||||||
|
|
||||||
@@ -74,15 +84,18 @@ Generate a client cert:
|
|||||||
$ ./easyrsa build-client-full mediaserver nopass
|
$ ./easyrsa build-client-full mediaserver nopass
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
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:
|
Also, if you want generic clients that all get dynamic IPs for use on your
|
||||||
|
laptop, phone, etc. to protect you from public WiFi, create only a single extra one:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ ./easyrsa build-client-full client nopass # optional
|
$ ./easyrsa build-client-full client nopass # optional
|
||||||
```
|
```
|
||||||
|
|
||||||
Leave off `nopass` if you want to password protect the config file keys when you set up a new client.
|
Leave off `nopass` if you want to password protect the config file keys when you
|
||||||
|
set up a new client.
|
||||||
|
|
||||||
Create the server config file `/etc/openvpn/server.conf`:
|
Create the server config file `/etc/openvpn/server.conf`:
|
||||||
|
|
||||||
@@ -168,7 +181,8 @@ $ ip addr
|
|||||||
|
|
||||||
### Port Forwarding
|
### Port Forwarding
|
||||||
|
|
||||||
I use `ufw` to handle the iptables rules because I use it anyway as a firewall when I harden my servers.
|
I use `ufw` to handle the iptables rules because I use it anyway as a firewall
|
||||||
|
when I harden my servers.
|
||||||
|
|
||||||
Enable routing:
|
Enable routing:
|
||||||
|
|
||||||
@@ -203,11 +217,14 @@ Add this to the top of `/etc/ufw/before.rules`:
|
|||||||
COMMIT
|
COMMIT
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace `123.123.123.123` with your VPN server's external IP address and `eth0` with the external interface.
|
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)
|
[https://txt.t0.vc/URUG](https://txt.t0.vc/URUG)
|
||||||
|
|
||||||
@@ -260,7 +277,8 @@ key-direction 1
|
|||||||
</tls-auth>
|
</tls-auth>
|
||||||
```
|
```
|
||||||
|
|
||||||
Replace the `[server ...]` lines with the contents of that file on the __VPN server__, for example:
|
Replace the `[server ...]` lines with the contents of that file on the __VPN
|
||||||
|
server__, for example:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo cat /etc/openvpn/easy-rsa/pki/ca.crt
|
$ sudo cat /etc/openvpn/easy-rsa/pki/ca.crt
|
||||||
@@ -346,17 +364,22 @@ $ sudo service openvpn restart
|
|||||||
|
|
||||||
### Client Apps
|
### Client Apps
|
||||||
|
|
||||||
On Android I use "OpenVPN for Android" and on Linux I use the `network-manager-openvpn-gnome` Debian package.
|
On Android I use "OpenVPN for Android" and on Linux I use the
|
||||||
|
`network-manager-openvpn-gnome` Debian package.
|
||||||
|
|
||||||
To add your VPN on Gnome, open VPN settings, import file, and select `client.ovpn`. If the private key is missing, select it from `~/.cert/nm-openvpn/`.
|
To add your VPN on Gnome, open VPN settings, import file, and select
|
||||||
|
`client.ovpn`. If the private key is missing, select it from
|
||||||
|
`~/.cert/nm-openvpn/`.
|
||||||
|
|
||||||
## Closing Thoughts
|
## Closing Thoughts
|
||||||
|
|
||||||
You should now be fine to access your home server from over the internet.
|
You should now be fine to access your home server from over the internet.
|
||||||
|
|
||||||
To forward additional ports, just edit the `/etc/ufw/before.rules` file like above and apply the changes to `ufw`.
|
To forward additional ports, just edit the `/etc/ufw/before.rules` file like
|
||||||
|
above.
|
||||||
|
|
||||||
You can now point a domain to your virtual server's IP and use that to connect to your home server. Use a CNAME to make it easy to change later:
|
You can now point a domain to your virtual server's IP and use that to connect
|
||||||
|
to your home server. Use a CNAME to make it easy to change later:
|
||||||
|
|
||||||
```
|
```
|
||||||
NAME TYPE VALUE
|
NAME TYPE VALUE
|
||||||
@@ -365,4 +388,5 @@ vpn.example.com. A 123.123.123.123
|
|||||||
myserver.example.com. CNAME vpn.example.com.
|
myserver.example.com. CNAME vpn.example.com.
|
||||||
```
|
```
|
||||||
|
|
||||||
Finally, make sure any server programs are listening / bound to `10.8.0.100` or `0.0.0.0` so that they can get traffic from that interface.
|
Finally, make sure any server programs are listening / bound to `10.8.0.100` or
|
||||||
|
`0.0.0.0` so that they can get traffic from that interface.
|
@@ -1,2 +0,0 @@
|
|||||||
User-agent: *
|
|
||||||
Disallow:
|
|
28
content/hand-of-ozymandias.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Title: Hand of Ozymandias
|
||||||
|
Date: 2012-03-23
|
||||||
|
Category: Projects
|
||||||
|
Summary: A withered hand I welded out of scrap metal.
|
||||||
|
|
||||||
|
I was visiting my cousins in Radium, BC and decided to learn stick welding at
|
||||||
|
their shop. I wanted to create a sculpture, so with pieces of scrap metal I
|
||||||
|
welded together this hand. The beads are far from perfect. Working with small
|
||||||
|
pieces of rusted metal made it difficult.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## The Name
|
||||||
|
|
||||||
|
One of my favourite poems is [Ozymandias](https://en.wikipedia.org/wiki/Ozymandias)
|
||||||
|
by Percy Bysshe Shelley. It's about the inevitable complete decline of all
|
||||||
|
rulers and the empires they build, however mighty in their time. This is the
|
||||||
|
hand of Ozymandias sticking out from the sand, grasping for life after he has
|
||||||
|
been reduced to dust.
|
||||||
|
|
||||||
|
## Construction
|
||||||
|
|
||||||
|
I eyeballed the joint angles and my cousin cut them to spec with an angle
|
||||||
|
grinder. It was made in a machine shop with no real planning done ahead of time.
|
||||||
|
In between welds, I used my own hand as a reference. Below is a picture of me
|
||||||
|
adding a bead to it.
|
||||||
|
|
||||||
|

|
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 198 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 154 KiB After Width: | Height: | Size: 154 KiB |
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
Before Width: | Height: | Size: 116 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 350 KiB After Width: | Height: | Size: 350 KiB |
Before Width: | Height: | Size: 286 KiB After Width: | Height: | Size: 286 KiB |
28
content/led-dress.md
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Title: LED Dress
|
||||||
|
Date: 2016-03-18
|
||||||
|
Category: Projects
|
||||||
|
Summary: A dress made out of LEDs that twinkle like stars.
|
||||||
|
|
||||||
|
A friend of mine was attending a stars and constellations themed ball. She
|
||||||
|
wanted to wear a dress that was lit up with LEDs acting as twinkling stars.
|
||||||
|
Seven of the 28 stars are aligned to resemble the Big Dipper constellation and
|
||||||
|
twinkle differently than the rest, which twinkle in a random pattern.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Construction
|
||||||
|
|
||||||
|
The LEDs came from that strip that was cut up and soldered together with very
|
||||||
|
small wires. Each of the LEDs can be controlled individually.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
21 of the stars are light magenta in color and twinkle by fading randomly. The
|
||||||
|
seven LEDs that form the Big Dipper continually scroll through a gradient of
|
||||||
|
three colors. Instead of calculating the values of each color in the gradient as
|
||||||
|
the program runs, a lookup table is used.
|
||||||
|
|
||||||
|
<video autoplay muted loop style="display:block; margin: 0 auto;">
|
||||||
|
<source src="{static}/videos/dress/dress3.mp4" type="video/mp4">
|
||||||
|
Your browser does not support the video tag.
|
||||||
|
</video>
|
33
content/light-switch.md
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
Title: Remote Control Light Switch
|
||||||
|
Date: 2014-10-09
|
||||||
|
Category: Projects
|
||||||
|
Summary: A device to toggle my lights remotely.
|
||||||
|
|
||||||
|
I wanted the ability to toggle my bedroom light remotely for convenience. I
|
||||||
|
designed a circuit that allows me to control my light with any
|
||||||
|
device that can load a webpage.
|
||||||
|
|
||||||
|
I still wanted to be able to control the light manually, so I bought a metallic
|
||||||
|
face-plate and turned it into a capacitive touch sensor. The slightest touch
|
||||||
|
anywhere on the plate is enough to toggle the light. I had to electrically
|
||||||
|
isolate the metal screws from it because they screw into a grounded switch box.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Function
|
||||||
|
|
||||||
|
I have a Raspberry Pi ($35 computer) on my home network that runs a web server.
|
||||||
|
When you connect to it in your web browser, a page loads with buttons to turn
|
||||||
|
the light on or off. When you press a button, the server executes a command that
|
||||||
|
sends a message over Bluetooth to the light switch. The Bluetooth module in the
|
||||||
|
wall receives this message and forwards it to the microcontroller, which
|
||||||
|
processes it and toggles the relay. The whole circuit is also powered from mains
|
||||||
|
by an AC-DC converter.
|
||||||
|
|
||||||
|
This entire process happens quicker than half a second, so it feels instant.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
<span class="aside">Black stuff's liquid electrical tape</span>
|
||||||
|
|
||||||
|

|
106
content/linux-flavour.md
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
Title: Choosing a Linux Flavour
|
||||||
|
Date: 2020-10-31
|
||||||
|
Category: Writing
|
||||||
|
Summary: A recommendation on which flavour of Linux to run.
|
||||||
|
Wide: true
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
|
People often ask me which flavour of Linux they should install. In summary,
|
||||||
|
choose Ubuntu if it's your first time. Once you are comfortable, install Debian
|
||||||
|
the next time you need to install Linux.
|
||||||
|
|
||||||
|
I run Debian on my computers and servers.
|
||||||
|
|
||||||
|
## Linux Distributions
|
||||||
|
|
||||||
|
When people refer to the "flavour of Linux" they are talking about a Linux
|
||||||
|
<span class="aside">Interjection: it's technically called GNU/Linux</span>
|
||||||
|
distribution (distro). It mostly describes what software is distributed in its
|
||||||
|
software repository.
|
||||||
|
|
||||||
|
"A typical Linux distribution comprises a Linux kernel, GNU tools and
|
||||||
|
libraries, additional software, documentation, a window system, a window
|
||||||
|
manager, and a desktop environment." [Wikipedia]
|
||||||
|
|
||||||
|
The major Linux distros are practically all the same. If you master one it's
|
||||||
|
easy to pick up the others. The main differences you'll run into are which
|
||||||
|
tools you use to install new software, and the desktop environment, which is
|
||||||
|
what all the windows and buttons look like.
|
||||||
|
|
||||||
|
I recommend two Linux distros, Debian and Ubuntu. Ubuntu is based off of
|
||||||
|
Debian, so they are very similar.
|
||||||
|
|
||||||
|
## Pros of Debian
|
||||||
|
|
||||||
|
Debian is one of the oldest distros and many other distros are based off it.
|
||||||
|
You can see a timeline visualization of all its derivatives here:
|
||||||
|
|
||||||
|
<https://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg>
|
||||||
|
|
||||||
|
This image is what originally convinced me to use Debian. Scroll down until you
|
||||||
|
see it and zoom out so you grasp how many derivatives it has.
|
||||||
|
|
||||||
|
Debian is also non-commercial and requires that all software in its main
|
||||||
|
repository is free and open source. This is important because that grants you
|
||||||
|
the right to study, change, and distribute the software and source code to
|
||||||
|
anyone and for any purpose. They also follow a strong social contract you can
|
||||||
|
see here:
|
||||||
|
|
||||||
|
<https://www.debian.org/social_contract>
|
||||||
|
|
||||||
|
It's also a very stable Linux distro since they freeze all software features on
|
||||||
|
each release. This makes it great for servers because nothing will break when
|
||||||
|
it updates.
|
||||||
|
|
||||||
|
The main Raspberry Pi distro is nearly identical to Debian, so you'll also gain
|
||||||
|
familiarity with it.
|
||||||
|
|
||||||
|
## Cons of Debian
|
||||||
|
|
||||||
|
Since Debian requires all its software to be free and open source, proprietary
|
||||||
|
hardware drivers aren't included in its main repo. This can make installing
|
||||||
|
Debian difficult if your hardware requires non-free drivers. You'll need to use
|
||||||
|
a non-free installation image found here:
|
||||||
|
|
||||||
|
<https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/>
|
||||||
|
|
||||||
|
The fact that Debian freezes software features can also mean that your software
|
||||||
|
gets old until the next Debian release. If you want versions that are bleeding
|
||||||
|
edge, you'll need to use Debian Unstable as described here:
|
||||||
|
|
||||||
|
<https://wiki.debian.org/DebianUnstable#Installation>
|
||||||
|
|
||||||
|
Don't be fooled by the name "unstable". I use it for my personal computers and
|
||||||
|
it runs fine.
|
||||||
|
|
||||||
|
## Pros of Ubuntu
|
||||||
|
|
||||||
|
Ubuntu is incredibly easy to install. You can also try it out before deciding
|
||||||
|
to install it. The distro pretty much just works on what ever hardware you
|
||||||
|
have.
|
||||||
|
|
||||||
|
It's very beginner friendly because it's so popular. Any problem you search for
|
||||||
|
will reveal dozens of threads with people solving the same problem.
|
||||||
|
|
||||||
|
## Cons of Ubuntu
|
||||||
|
|
||||||
|
Unfortunately Ubuntu is developed by a commercial company, Canonical. The
|
||||||
|
company's interests come first, before the users' and they have a track record
|
||||||
|
of betraying their users' trust and privacy.
|
||||||
|
|
||||||
|
Years ago Ubuntu had a feature enabled by default that would send your desktop
|
||||||
|
searches to Amazon so they could suggest products for you to buy:
|
||||||
|
|
||||||
|
<https://www.pcworld.com/article/2840401/ubuntus-unity-8-desktop-removes-the-amazon-search-spyware.html>
|
||||||
|
|
||||||
|
Currently whenever you remote login to your Ubuntu machine, it phones home to
|
||||||
|
Canonical and they collect info about your system:
|
||||||
|
|
||||||
|
<https://ubuntu.com/legal/motd>
|
||||||
|
|
||||||
|
While these reasons are fairly minor, they are quite frowned upon in the Linux
|
||||||
|
community and are reason enough to switch to Debian once you are comfortable
|
||||||
|
with using Linux.
|
||||||
|
|
||||||
|
[Wikipedia]: https://en.wikipedia.org/wiki/Linux_distribution
|
Before Width: | Height: | Size: 277 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 153 KiB |
Before Width: | Height: | Size: 239 KiB |
Before Width: | Height: | Size: 247 KiB |
Before Width: | Height: | Size: 293 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 162 KiB |
Before Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 112 KiB |
Before Width: | Height: | Size: 385 KiB |
Before Width: | Height: | Size: 577 KiB |
Before Width: | Height: | Size: 212 KiB |
Before Width: | Height: | Size: 182 KiB |
Before Width: | Height: | Size: 9.3 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 180 KiB |
Before Width: | Height: | Size: 211 KiB |
Before Width: | Height: | Size: 152 KiB |
Before Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 146 KiB |
Before Width: | Height: | Size: 151 KiB |
@@ -1,6 +0,0 @@
|
|||||||
Title: Creations
|
|
||||||
Template: creations
|
|
||||||
Slug: z
|
|
||||||
|
|
||||||
|
|
||||||
Qot.
|
|
@@ -1,6 +0,0 @@
|
|||||||
Title: Projects
|
|
||||||
Template: projects
|
|
||||||
Slug: y
|
|
||||||
|
|
||||||
|
|
||||||
Qot.
|
|
@@ -1,6 +0,0 @@
|
|||||||
Title: Writing
|
|
||||||
Template: writing
|
|
||||||
Slug: x
|
|
||||||
|
|
||||||
|
|
||||||
Qot.
|
|
40
content/painting.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
Title: Man’s Reach Exceeds His Grasp
|
||||||
|
Date: 2012-04-11
|
||||||
|
Category: Projects
|
||||||
|
Summary: My first attempt at painting with acrylic.
|
||||||
|
|
||||||
|
The painting is called “Man’s Reach Exceeds His Grasp”. I've always wanted to
|
||||||
|
try painting and thought I had a good idea, so after a couple of drawings I
|
||||||
|
attempted to paint it. I eventually got it framed at Michaels. Many thanks to my
|
||||||
|
friend Laura for the opportunity to do this, I couldn't have done it without her
|
||||||
|
help.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## The Meaning
|
||||||
|
|
||||||
|
It’s hard to see in the photo, but the moment the water touches his hand it
|
||||||
|
turns into sand and is taken by the slight breeze. The title is a quote from
|
||||||
|
Andrea del Sarto, a poem by Robert Browning. It is also said by Nikola Tesla’s
|
||||||
|
character in my favourite movie, [The Prestige](https://www.imdb.com/title/tt0482571/).
|
||||||
|
|
||||||
|
“I, painting from myself and to myself,
|
||||||
|
Know what I do, am unmoved by men’s blame
|
||||||
|
Or their praise either. Somebody remarks
|
||||||
|
Morello's outline there is wrongly traced,
|
||||||
|
His hue mistaken; what of that? or else,
|
||||||
|
Rightly traced and well ordered; what of that?
|
||||||
|
Speak as they please, what does the mountain care?
|
||||||
|
Ah, but a man’s reach should exceed his grasp,
|
||||||
|
Or what’s a heaven for?”
|
||||||
|
– Robert Browning from *Andrea del Sarto*
|
||||||
|
|
||||||
|
## Creation
|
||||||
|
|
||||||
|
I started with the background, trying to make it blurry and out of focus, then
|
||||||
|
slowly progressed to the foreground. The hands were drawn in pencil and painted
|
||||||
|
in. It was quite difficult to get the blending and shadows perfect, but I had
|
||||||
|
Laura to tell me when things didn't look right. Below I am trying to figure out
|
||||||
|
what a hand looks like in a mirror.
|
||||||
|
|
||||||
|

|
41
content/plant-waterer.md
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
Title: Automatic Plant Waterer
|
||||||
|
Date: 2014-06-05
|
||||||
|
Category: Projects
|
||||||
|
Summary: A device that automatically waters plants.
|
||||||
|
|
||||||
|
One day I decided watering my one plant was too much work, so I automated it.
|
||||||
|
It's also great for when I'm on vacation. The plant is a year old now and
|
||||||
|
doesn't look as good as it used to (kinda like you). So this machine is like its
|
||||||
|
life support.
|
||||||
|
|
||||||
|
<span class="aside">Update: this plant died long ago</span>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## First Attempt
|
||||||
|
|
||||||
|
The design was very simple and soldered together on perf board. A
|
||||||
|
microcontroller turns the pump on for 20 seconds, then waits 24 hours and
|
||||||
|
restarts. The pump ran way too fast so it was slowed down to 10% power.
|
||||||
|
|
||||||
|
This design suffered from a fatal problem. After running, there was a chance
|
||||||
|
that the tube would stay full of fluid. If the water level in the pop bottle was
|
||||||
|
too high, it could siphon out. I woke up with a flower pot overflowing with
|
||||||
|
water a couple of times.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Second Attempt
|
||||||
|
|
||||||
|
I liked the idea so much that I made a second iteration. This one used a custom
|
||||||
|
printed circuit board with a lot more features. The pumping duration could be
|
||||||
|
adjusted with a screwdriver. This was useful as the plant (now a
|
||||||
|
[Ming aralia](https://en.wikipedia.org/wiki/Polyscias_fruticosa)) grew.
|
||||||
|
|
||||||
|
Another feature was the ability to run the pump backwards. This completely
|
||||||
|
eliminated the siphoning problem from before. After pumping for a set duration,
|
||||||
|
it would run backwards until the tube was cleared of water.
|
||||||
|
|
||||||
|
<span class="aside">Also dead :(</span>
|
||||||
|
|
||||||
|

|
23
content/solar-car.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Title: Solar Car
|
||||||
|
Date: 2013-04-27
|
||||||
|
Category: Projects
|
||||||
|
Summary: About my time volunteering with the University of Calgary Solar Car Team, where I designed a maximum power point tracker.
|
||||||
|
|
||||||
|
I joined the University of Calgary Solar Car Team in my first semester for a
|
||||||
|
chance to learn things, gain practical experience, and meet people that share my
|
||||||
|
interests. The car was the top Canadian team in a 3000 km race from Darwin to
|
||||||
|
Adelaide, Australia in 2011. We met up at a shop on campus every Saturday
|
||||||
|
morning to work on the new Generation IV of the solar car.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## The Helianthus MPPT
|
||||||
|
|
||||||
|
I was in charge of designing and assembling the MPPTs (maximum power point
|
||||||
|
trackers) for the new generation solar car. An MPPT extracts as much power out
|
||||||
|
of the solar cells as possible. The solar array operates less efficiently
|
||||||
|
without them. The Generation IV car, Schulich Delta (pictured below) uses seven
|
||||||
|
of them: one per section of solar cells with similar lighting conditions. Andrei
|
||||||
|
and I designed the MPPT above.
|
||||||
|
|
||||||
|

|
@@ -1,31 +0,0 @@
|
|||||||
Title: t-zero Services
|
|
||||||
Date: 2022-05-27
|
|
||||||
Category: Writing
|
|
||||||
Summary: A list of minimal microservices on my t0.vc domain.
|
|
||||||
Wide: true
|
|
||||||
Short: 6
|
|
||||||
|
|
||||||
The t-zero Services are a collection of minimalist microservices that I host on my t0.vc domain. The letter "t" meaning me, and "0" meaning small. They're all meant to do exactly one thing reliably and stay online for as long as I can host them.
|
|
||||||
|
|
||||||
## t0.vc
|
|
||||||
The smallest t-zero is the main domain itself at [t0.vc](https://t0.vc) and it serves as a lite version of my personal website, which you are reading this on. It fits under 1000 bytes in size without being boring to read because it sacrifices everything else for pure content. Including closing HTML tags.
|
|
||||||
|
|
||||||
The rest of the t-zero services are hosted on its subdomains.
|
|
||||||
|
|
||||||
## t0txt
|
|
||||||
The second t-zero I wrote was [[t0txt]], a pastebin that is compatible with the command line and `curl`. This allows me to very easily pipe text data into it and immediately get a URL that I can share. I copied the idea from [sprunge.us](http://sprunge.us/) which kept going down because he'd forget to pay his Google Cloud bill.
|
|
||||||
|
|
||||||
## t0pic
|
|
||||||
I figured that since I have a pastebin, I might as well make an image host since Imgur now sucks. It supports web and command line upload and pasting directly into the web page. I don't advertise it because public image hosts usually end up abused. However, you can easily find it if you follow the naming pattern.
|
|
||||||
|
|
||||||
## t0url
|
|
||||||
Next I created a URL shortener called t0url because I wanted to transfer links between devices quickly. Other shorteners use longer IDs but since this is my own, I can get away with only four capital letters which makes them easy to type and remember. I also don't advertise it because URL shorteners end up abused by scammers.
|
|
||||||
|
|
||||||
## t0reg
|
|
||||||
I then built a key-value store called [t0reg](https://reg.t0.vc). With "reg" meaning registers, it acts exactly like the t0txt pastebin but you can specify the destination ID where the data is stored. This is the most esoteric service, but the most used one because I have bots and scripts that periodically push and pull data to it. I also have bash curl aliases set up to help move data between servers with `foo | push` and `pull > foo.txt`.
|
|
||||||
|
|
||||||
## t0sig
|
|
||||||
My site's [guestbook](https://t0.vc/g/) is powered by t0sig. When a guestbook entry is submitted, it's held in memory and assigned an ID. A bot then sends me the message over Telegram and I can choose to approve it by clicking a command. After approval, the message is simply appended to the end of the guestbook page. You can read the source code [here](https://git.tannercollin.com/tanner/t0sig/src/branch/master/t0sig.py).
|
|
||||||
|
|
||||||
## t0dns
|
|
||||||
I wrote the Telegram bot [t0dns](https://t.me/t0dns_bot) to quickly manage DNS records for `dns.t0.vc`. I got tired of logging into my domain registrar every time I wanted to add a subdomain for whatever random project I was working on. Now I only have to send a command to the bot like `/add_cname sensors ms.tannercollin.com.` and it will add the `sensors.dns.t0.vc` record to a zone file that it resolves. Anyone can use it, but I routinely prune the records so don't rely on it.
|
|
@@ -1,33 +0,0 @@
|
|||||||
Title: t0txt
|
|
||||||
Date: 2022-05-15
|
|
||||||
Category: Projects
|
|
||||||
Summary: Minimal command line pastebin. Allows you to upload text notes from a bash pipe or web browser.
|
|
||||||
Short: t
|
|
||||||
|
|
||||||
[t0txt](https://txt.t0.vc) is a minimalist pastebin. You can upload text notes from the command line by using a bash alias or by submitting text through the web form.
|
|
||||||
|
|
||||||
You can find the [source code](https://github.com/tannercollin/t0txt) on Github.
|
|
||||||
|
|
||||||
The pastes you upload take the form of [txt.t0.vc/IMLV](https://txt.t0.vc/IMLV), where they are identified by four unique capital letters. This makes it easy to memorize the URL while moving it between devices.
|
|
||||||
|
|
||||||
I wrote t0txt in July 2019 and plan to continue hosting it indefinitely. I use it quite often for sysadmin and automation work, so I'm committed to keeping it alive. Here's an example use case:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ echo "hello world!" | txt
|
|
||||||
https://txt.t0.vc/IMLV
|
|
||||||
|
|
||||||
$ curl https://txt.t0.vc/IMLV
|
|
||||||
hello world!
|
|
||||||
```
|
|
||||||
|
|
||||||
## Spam Issue
|
|
||||||
After running t0txt for a while, I noticed there were a large number of pastes only containing random links. The service was being hit by backlink spam bots who try to submit any web form they find hoping they can spread links around. They do this to try and improve the search ranking of their client's websites. I added a simple CAPTCHA with the question "Who owns this site?" that checks for a substring of "tanner". This seems to have eliminated most spam.
|
|
||||||
|
|
||||||
I found a lot of txt.t0.vc links around the internet with pastes containing all sorts of spam. Cheap pharmaceuticals, blogs, online casinos, porn, and surprisingly lots of essay writing services. I wanted to clean these up because I didn't want the URL to be tarnished. I wrote a simple [script](https://github.com/tannercollin/t0txt/blob/master/misc/clean.py) that deletes pastes based on spam-words. It deleted 22,500 pastes out of the total 33,000 in the database.
|
|
||||||
|
|
||||||
The spam cleaning script iterates over all pastes. If the paste contains a word from the whitelist, it continues because it's probably related to one of my projects. If it contains a banned word from a list, it's marked for deletion. If it contains at least two words commonly associated with spam, it's also marked for deletion. A large percentage of the spam was in different languages I can't read, so I randomly chose words hoping to not get many false positives. Finally it counts the number of occurrences of "http" and compares it to the number of lines. If the count and ratio is above a threshold, it's marked for deletion.
|
|
||||||
|
|
||||||
## Don't Advertise your Pastebin
|
|
||||||
Pastebins are one of those projects not worth advertising. You should keep it within your circle of friends and grow by word-of-mouth and people seeing the links to your pastes. Additional users don't really get you anything except a larger database you have to back up. Advertising it will just bring spam which tarnishes the reputation of your domain and any subdomains on it.
|
|
||||||
|
|
||||||
I regret advertising t0txt, but the cat is already out of the bag so it doesn't really matter going forward. It would be interesting to make a pastebin where the paste's domain is different than the submission domain if you want to keep it somewhat hidden.
|
|
@@ -1,47 +0,0 @@
|
|||||||
aka pollution, dust
|
|
||||||
|
|
||||||
Study linking air pollution to mental disorders:
|
|
||||||
https://www.kcl.ac.uk/news/study-supports-link-between-traffic-related-air-pollution-and-mental-disorders
|
|
||||||
|
|
||||||
Calgary air quality:
|
|
||||||
https://www.cbc.ca/news/canada/calgary/calgary-air-quality-map-ranking-1.4547149
|
|
||||||
|
|
||||||
Woodgears (Matthias Wandel) page on dust:
|
|
||||||
https://woodgears.ca/dust/dylos.html
|
|
||||||
https://woodgears.ca/dust_collector/index.html
|
|
||||||
|
|
||||||
Study of low-cost sensor accuracy:
|
|
||||||
https://www.hindawi.com/journals/js/2018/5096540/
|
|
||||||
|
|
||||||
Experiments on DIY air purifier:
|
|
||||||
https://news.t0.vc/QZKP
|
|
||||||
https://dyno-might.github.io/2020/12/15/some-real-data-on-a-DIY-box-fan-air-purifier/
|
|
||||||
|
|
||||||
|
|
||||||
Sensors
|
|
||||||
=======
|
|
||||||
|
|
||||||
Fancy serial one with inlet:
|
|
||||||
- SDS011
|
|
||||||
- $17 USD
|
|
||||||
https://www.aliexpress.com/item/32606349048.html
|
|
||||||
|
|
||||||
One Farzad gave me:
|
|
||||||
- DSM501A
|
|
||||||
- $4 USD
|
|
||||||
https://www.aliexpress.com/item/1005001710572424.html
|
|
||||||
|
|
||||||
Fancy commercial one:
|
|
||||||
- DC1100 PRO
|
|
||||||
- $289 USD
|
|
||||||
|
|
||||||
Professional fluke:
|
|
||||||
- Fluke 985
|
|
||||||
- $7000 CAD
|
|
||||||
|
|
||||||
Good digikey one:
|
|
||||||
- https://www.digikey.ca/en/products/detail/honeywell-sensing-and-productivity-solutions/HPMA115S0-XXX/7202204
|
|
||||||
- connector? https://www.digikey.ca/en/products/detail/molex/0151340803/6198165 --- NO
|
|
||||||
- cable per sensor:
|
|
||||||
- 4 x 900-2149211112-ND (pre-crimped lead)
|
|
||||||
- 1 x WM1726-ND (connector housing)
|
|
@@ -1,51 +0,0 @@
|
|||||||
aka hacking apk reverse engineering
|
|
||||||
|
|
||||||
|
|
||||||
Guides:
|
|
||||||
|
|
||||||
https://blog.securityevaluators.com/how-to-view-tls-traffic-in-androids-logs-6a42ca7a6e55
|
|
||||||
https://archive.ph/zDaV6
|
|
||||||
- used during Lutron hacking
|
|
||||||
|
|
||||||
Tools:
|
|
||||||
$ sudo apt install adb apktool openjdk-11-jdk-headless zipalign apksigner
|
|
||||||
$ locate apktool
|
|
||||||
- replace apktool with new version:
|
|
||||||
- https://github.com/iBotPeaches/Apktool/releases
|
|
||||||
$ sudo mv /usr/share/apktool/apktool.jar /usr/share/apktool/apktool.jar.orig
|
|
||||||
$ sudo mv ~/Downloads/apktool_2.5.0.jar /usr/share/apktool/apktool.jar
|
|
||||||
|
|
||||||
|
|
||||||
Get APK file:
|
|
||||||
- find name of the app
|
|
||||||
$ adb shell pm list packages | grep covid
|
|
||||||
- find path of the app
|
|
||||||
$ adb shell pm path ca.ab.gov.covidrecordsverifier
|
|
||||||
- pull the apk
|
|
||||||
$ adb pull [path] .
|
|
||||||
|
|
||||||
Decompile:
|
|
||||||
$ apktool d application.apk -o output/
|
|
||||||
|
|
||||||
Compile:
|
|
||||||
$ apktool b output/ --use-aapt2 -o patched.apk
|
|
||||||
$ zipalign 4 patched.apk patched2.apk
|
|
||||||
|
|
||||||
Sign:
|
|
||||||
- disable verification over USB in developer settings?
|
|
||||||
- the following just once:
|
|
||||||
$ keytool -genkey -v -keystore release.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
|
|
||||||
$ apksigner sign --ks release.keystore patched2.apk
|
|
||||||
|
|
||||||
Install:
|
|
||||||
$ adb install patched2.apk
|
|
||||||
|
|
||||||
|
|
||||||
Read logs:
|
|
||||||
$ adb logcat -c
|
|
||||||
|
|
||||||
|
|
||||||
Old instructions
|
|
||||||
----------------
|
|
||||||
|
|
||||||
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release.keystore patched.apk alias_name
|
|
@@ -1,67 +0,0 @@
|
|||||||
Slowing Aging
|
|
||||||
=============
|
|
||||||
|
|
||||||
- Avoid DNA damage (wear sunscreen)
|
|
||||||
- Eat less - caloric restriction
|
|
||||||
- Eat less protein
|
|
||||||
- Do exercise (HIIT)
|
|
||||||
- Be cold
|
|
||||||
- Be hot
|
|
||||||
|
|
||||||
... these trigger longevity genes to trick body into preserving genome
|
|
||||||
|
|
||||||
|
|
||||||
Reversing aging
|
|
||||||
===============
|
|
||||||
|
|
||||||
Theory
|
|
||||||
------
|
|
||||||
|
|
||||||
- Shinya Yamanaka discovered 4 factors that reset epigenome of cell back to pluriportent stem cell
|
|
||||||
- Myc, Oct3/4, Sox2 and Klf4
|
|
||||||
- dont do it all, would turn into tumor
|
|
||||||
- suggests there are ways to revert cells and reverse ageing
|
|
||||||
- David Sinclar's lab reversed aging in old mice so they could see like they were young again
|
|
||||||
- used 3/4 of the reprogramming factors, not Myc as causes cancer
|
|
||||||
- can turn system on and off to limit reversal
|
|
||||||
|
|
||||||
|
|
||||||
Resources
|
|
||||||
=========
|
|
||||||
|
|
||||||
- Veratasium How to Slow Aging:
|
|
||||||
https://www.youtube.com/watch?v=QRt7LjqJ45k
|
|
||||||
|
|
||||||
- JRE David Sinclair #1:
|
|
||||||
https://www.youtube.com/watch?v=HOTS0HS7aq4
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
Calorie restriction, mostly vegetarian diet, avoid sugar and carbs.
|
|
||||||
On weekends, he exercises at the gym and then sits in a hot sauna before plunging himself into an ice-cold pool, as well as tracks his biomarkers regularly.
|
|
||||||
Takes vitamin D, vitamin K2, and aspirin.
|
|
||||||
Takes each morning: resveratrol, NMN, and metformin
|
|
||||||
|
|
||||||
- JRE David Sinclair #2:
|
|
||||||
https://www.youtube.com/watch?v=ZGLL77wYxe8
|
|
||||||
|
|
||||||
0:00 The new book, resveratrol
|
|
||||||
7:00 NMN and NAD+, metformin and exercise
|
|
||||||
18:00 Sinclair’s family went on a safari
|
|
||||||
48:30 back to the anti-aging book, longevity
|
|
||||||
52:20 Sinclair’s healthy 80 year old father: “He’s fitter than me”, his rebel grandmother
|
|
||||||
1:10:00 intermittent fasting
|
|
||||||
1:15:50 I.V. NAD+
|
|
||||||
1:18:00 nutrition, yogurt and other food
|
|
||||||
1:32:00 resveratrol, colorful foods
|
|
||||||
1:41:00 sleep
|
|
||||||
1:45:40 what should people be doing? (Sinclair is wrong about airport scanners)
|
|
||||||
1:48:25 NMN and NR online
|
|
||||||
1:50:25 CRISPR/ genetic engineering
|
|
||||||
2:08:00 blood rejuvenation
|
|
||||||
2:12:50 what is on the horizon? senescence cells, “We’ve learned how to fly…”
|
|
||||||
|
|
||||||
- Age reduction breakthrough:
|
|
||||||
https://joshmitteldorf.scienceblog.com/2020/05/11/age-reduction-breakthrough/
|
|
||||||
|
|
||||||
- Yamanaka paper:
|
|
||||||
https://www.cell.com/fulltext/S0092-8674(06)00976-7
|
|
@@ -1,127 +0,0 @@
|
|||||||
UI / UX
|
|
||||||
=======
|
|
||||||
|
|
||||||
Principals:
|
|
||||||
https://news.t0.vc/EKUD/c#punnerud1596400621
|
|
||||||
|
|
||||||
Little details:
|
|
||||||
https://littlebigdetails.com/
|
|
||||||
|
|
||||||
Choosing a colour palette:
|
|
||||||
https://refactoringui.com/previews/building-your-color-palette/
|
|
||||||
|
|
||||||
What not to do:
|
|
||||||
https://annoying.technology/
|
|
||||||
https://grumpy.website/
|
|
||||||
|
|
||||||
|
|
||||||
Web Design / Inspo
|
|
||||||
==================
|
|
||||||
|
|
||||||
https://breakermag.com/trapped-at-sea-with-cryptos-nouveau-riche/
|
|
||||||
- Good mobile site, very clean and just works
|
|
||||||
|
|
||||||
https://www.maxhallinan.com/posts/2018/12/07/little-languages/
|
|
||||||
- Good, simple blog. Lacks an image-first menu though.
|
|
||||||
|
|
||||||
https://taimur.me/posts/notes-from-malcolm-gladwell-s-writing-masterclass-part-1
|
|
||||||
- Another left-aligned simple blog
|
|
||||||
|
|
||||||
http://haya2now.jp/en.html
|
|
||||||
- Cool dashboard UI for japanese space probe
|
|
||||||
|
|
||||||
https://wiki.xxiivv.com/#devine+lu+linvega
|
|
||||||
- Devine Lu Linvega: Some portfolio of a designer that makes and uses lots of tools and systems
|
|
||||||
|
|
||||||
https://maki.cat
|
|
||||||
- css / html god that's into japanese culture and cute things
|
|
||||||
|
|
||||||
https://www.thecut.com/2019/05/how-scammers-trick-people-into-thinking-theyre-wealthy.html
|
|
||||||
- very sexy clean cut news website
|
|
||||||
|
|
||||||
https://techcrunch.com/2019/05/06/windows-gets-a-new-terminal/
|
|
||||||
- clean blog post
|
|
||||||
|
|
||||||
https://wattenberger.com/
|
|
||||||
- she does lots of stuff
|
|
||||||
|
|
||||||
https://devonzuegel.github.io/
|
|
||||||
- also does lots of stuff, cool projects, notes
|
|
||||||
|
|
||||||
http://nolannicholson.com/index.html
|
|
||||||
- dead simple portfolio website. perfect, maybe just add images
|
|
||||||
- this might have changed?
|
|
||||||
|
|
||||||
https://vim.reversed.top/
|
|
||||||
- card like interface
|
|
||||||
|
|
||||||
https://simplenote.com/
|
|
||||||
- great product website
|
|
||||||
|
|
||||||
https://www.gwern.net/index
|
|
||||||
- latex looking site, guy does a lot of stuff
|
|
||||||
|
|
||||||
https://caro.io/
|
|
||||||
- good folio site with squares like what I wanted
|
|
||||||
|
|
||||||
https://markosaric.com/
|
|
||||||
- marketing guy that has a nice dark mode theme
|
|
||||||
- this guy tricked me into reading an ad: https://news.t0.vc/VBHA blew up on HN
|
|
||||||
|
|
||||||
https://anders.unix.se/
|
|
||||||
- very clean readable website
|
|
||||||
|
|
||||||
https://schollz.com
|
|
||||||
- also simple website with projects and blog. guy does a lot, very inspiring
|
|
||||||
|
|
||||||
https://www.unwoke.hr
|
|
||||||
- great design for job board
|
|
||||||
|
|
||||||
https://ciechanow.ski/archives/
|
|
||||||
- very informative blog with clean demos
|
|
||||||
|
|
||||||
https://mazaj.ca
|
|
||||||
- odai's friend arabic coffee website
|
|
||||||
- beautiful design, graphics, and business plan
|
|
||||||
|
|
||||||
https://www.brandur.org/articles
|
|
||||||
- sexy clean articles
|
|
||||||
|
|
||||||
https://secret.club/2021/05/13/source-engine-rce-join.html
|
|
||||||
- great blog design
|
|
||||||
|
|
||||||
https://www.munichre.com
|
|
||||||
- nice official business looking site
|
|
||||||
|
|
||||||
|
|
||||||
Motherfucking websites:
|
|
||||||
https://motherfuckingwebsite.com/
|
|
||||||
http://bettermotherfuckingwebsite.com/
|
|
||||||
https://perfectmotherfuckingwebsite.com/
|
|
||||||
https://thebestmotherfucking.website/
|
|
||||||
https://bestmotherfucking.website/
|
|
||||||
https://evenbettermotherfucking.website/
|
|
||||||
|
|
||||||
https://inconvergent.net/
|
|
||||||
https://img.inconvergent.net/generative/78b7266.html
|
|
||||||
- cool artist's minimalistic site
|
|
||||||
|
|
||||||
Crazy websites:
|
|
||||||
- https://news.t0.vc/EYHQ (list)
|
|
||||||
- https://www.kickscondor.com/
|
|
||||||
- https://yvettesbridalformal.p1r8.net/
|
|
||||||
|
|
||||||
|
|
||||||
Colors:
|
|
||||||
|
|
||||||
Nice colors:
|
|
||||||
- #83a8f3 (close to cornflower blue)
|
|
||||||
|
|
||||||
|
|
||||||
Fonts
|
|
||||||
=====
|
|
||||||
|
|
||||||
Baskerville:
|
|
||||||
https://fonts.google.com/specimen/Libre+Baskerville#pairings
|
|
||||||
- NYT study said it was best?
|
|
||||||
|
|
@@ -1,19 +0,0 @@
|
|||||||
aka Signal Conditioning, software defined radio, gnu radio, rtl-sdr
|
|
||||||
|
|
||||||
Good intro:
|
|
||||||
http://pyageng.mpastell.com/book/dsp.html
|
|
||||||
http://pyageng.mpastell.com/book/sampling.html#cid7
|
|
||||||
|
|
||||||
Textbook list:
|
|
||||||
https://dspguru.com/dsp/books/favorites/
|
|
||||||
|
|
||||||
DSP Guide:
|
|
||||||
http://www.dspguide.com/
|
|
||||||
|
|
||||||
GNU Radio cookbook:
|
|
||||||
https://cdn.hackaday.io/files/1648847054397056/GRC%20Cook%20Book.pdf
|
|
||||||
|
|
||||||
SDR assignments:
|
|
||||||
https://greatscottgadgets.com/sdr/
|
|
||||||
|
|
||||||
|
|
@@ -1,28 +0,0 @@
|
|||||||
Datasheet:
|
|
||||||
https://www.espressif.com/sites/default/files/documentation/0a-esp8266ex_datasheet_en.pdf
|
|
||||||
Tech Reference:
|
|
||||||
https://www.espressif.com/sites/default/files/documentation/esp8266-technical_reference_en.pdf
|
|
||||||
PCB Design Guidelines:
|
|
||||||
https://www.espressif.com/sites/default/files/documentation/esp8266_hardware_design_guidelines_en.pdf
|
|
||||||
|
|
||||||
Pins
|
|
||||||
====
|
|
||||||
|
|
||||||
Multiplexing analog input:
|
|
||||||
https://internetofhomethings.com/homethings/?p=530
|
|
||||||
|
|
||||||
Digital:
|
|
||||||
- has hysterisis
|
|
||||||
- Vil = 0.25 * Vin
|
|
||||||
- Vih = 0.75 * Vin
|
|
||||||
|
|
||||||
ADC:
|
|
||||||
- only 1 analog pin, A0
|
|
||||||
- 10 bits, 0-1023
|
|
||||||
- only supports 0.2 - 1.2 V, unless there's on-board voltage divider
|
|
||||||
|
|
||||||
|
|
||||||
WeMos D1 Mini
|
|
||||||
=============
|
|
||||||
|
|
||||||
- has on board 3V3 ADC divider
|
|
@@ -1,249 +0,0 @@
|
|||||||
Enter today's date in ISO format:
|
|
||||||
$ date -I
|
|
||||||
To include seconds:
|
|
||||||
$ date -Is
|
|
||||||
|
|
||||||
Ping scan subnet (find a Raspberry Pi):
|
|
||||||
$ nmap -sn 192.168.0.0/24
|
|
||||||
Port 22 scan subnet:
|
|
||||||
$ nmap -sS -p 22 192.168.10.0/24
|
|
||||||
- run as root to get device names
|
|
||||||
|
|
||||||
To SCP with spaces in path, escape the spaces and surround the whole arg with quotes.
|
|
||||||
|
|
||||||
Serial Terminal:
|
|
||||||
Minicom /dev/ttyACM0 115200 8N1 w/ Hardware flow control: yes works.
|
|
||||||
If not, send Break (ctrl-a F).
|
|
||||||
To enable on server side (systemd):
|
|
||||||
$ systemctl enable serial-getty@ttyS0.service
|
|
||||||
$ systemctl start serial-getty@ttyS0.service
|
|
||||||
|
|
||||||
How to list wifi networks:
|
|
||||||
$ sudo iw dev wlp58s0 scan
|
|
||||||
|
|
||||||
Show top 10 edited files in git repo:
|
|
||||||
$ git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -10
|
|
||||||
|
|
||||||
Recursively hash directory, then hash result:
|
|
||||||
$ md5deep -rl . | sort | md5sum
|
|
||||||
|
|
||||||
Redirect stderr to stdout and pipe: |&
|
|
||||||
Redirect stderr to stdout: 2>&1 (do it after)
|
|
||||||
|
|
||||||
Copy torrent but use hardlinks instead:
|
|
||||||
$ cp -al source dest
|
|
||||||
|
|
||||||
Byobu tmux toggle function keys:
|
|
||||||
Shift + F12
|
|
||||||
- do this if Alt+Arrow is letters
|
|
||||||
|
|
||||||
Get rid of extra byobu sessions:
|
|
||||||
$ tmux ls | grep ^_ | cut -f1 "-d:" | xargs -t -L1 -r tmux kill-session -t
|
|
||||||
|
|
||||||
Make a PDF look scanned:
|
|
||||||
$ convert "$1" -alpha Off -density 150 -colorspace gray -blur 0.5x0.5 -rotate 0.4 -level 40%,60% "scanned-$1"
|
|
||||||
|
|
||||||
Insert last arg: alt+.
|
|
||||||
Insert 2nd last arg: alt+_ alt+.
|
|
||||||
Insert 3rd last arg: alt+_ 2 alt+.
|
|
||||||
|
|
||||||
SSH reverse tunnel router admin:
|
|
||||||
$ ssh -L 2222:192.168.0.1:80 user@10.9.0.3
|
|
||||||
- open localhost:2222 in browser
|
|
||||||
|
|
||||||
Select a display over ssh:
|
|
||||||
$ export DISPLAY=:1
|
|
||||||
|
|
||||||
Spawn new shell with group assignments:
|
|
||||||
$ exec su -l $USER
|
|
||||||
|
|
||||||
xargs:
|
|
||||||
- converts stdin to arguments for commands that dont accept stdin
|
|
||||||
- used with echo, compacts a list to one line
|
|
||||||
- see each command xargs runs: --verbose
|
|
||||||
- dont run if stdin is empty: -r
|
|
||||||
- run command once per line: -L1
|
|
||||||
- convert stdin to argument:
|
|
||||||
$ echo 'foo' | xargs mkdir
|
|
||||||
- convert list to one line:
|
|
||||||
$ cat foo.txt | xargs echo
|
|
||||||
- run a command for each line:
|
|
||||||
$ cat foo.txt | xargs -L0 --verbose echo
|
|
||||||
|
|
||||||
|
|
||||||
Systemd
|
|
||||||
=======
|
|
||||||
|
|
||||||
Journalctl
|
|
||||||
----------
|
|
||||||
|
|
||||||
Examples:
|
|
||||||
$ journalctl --utc
|
|
||||||
$ journalctl -b # display logs since boot
|
|
||||||
$ journalctl --since "2015-01-10" --until "2015-01-11 03:00"
|
|
||||||
$ journalctl --since 09:00 --until "1 hour ago"
|
|
||||||
$ journalctl -u nginx.service -u php-fpm.service --since today
|
|
||||||
|
|
||||||
|
|
||||||
Bash scripting
|
|
||||||
==============
|
|
||||||
|
|
||||||
Always quote variables when you use them.
|
|
||||||
Run set -eu to crash when on errors and when using unset variables.
|
|
||||||
Use basedir to just get filename.
|
|
||||||
|
|
||||||
Gpg sign, encrypt, and armour:
|
|
||||||
gpg -sear [NAME]
|
|
||||||
|
|
||||||
Get window's handle with xdotool:
|
|
||||||
xdotool search --name "Google Play"
|
|
||||||
|
|
||||||
Get window's position and size with xdotool:
|
|
||||||
xdotool getwindowgeometry 44047673
|
|
||||||
Subtract 10 from the Y position, and 82 from the Y
|
|
||||||
|
|
||||||
|
|
||||||
Keyboard Shortcuts
|
|
||||||
==================
|
|
||||||
|
|
||||||
Focus Keepass, Super+Z: bash /home/tanner/scripts/focuskeepass.sh
|
|
||||||
Arrange Desktop, Super+X: /home/tanner/scripts/arrangedesktop.sh
|
|
||||||
Home Controller: Super+C: /home/tanner/scripts/homecontroller.sh
|
|
||||||
Toggle light 0, Super+1: /home/tanner/scripts/homecontroller.sh 0
|
|
||||||
Open terminal, Super+T: xfce4-terminal
|
|
||||||
Rofi, Super+`: rofi -combi-modi window,run -show combi -normal-window
|
|
||||||
|
|
||||||
** set "switch windows" to alt-tab to make it normal
|
|
||||||
|
|
||||||
Make right alt normal:
|
|
||||||
- tweak tool > keyboard & mouse > Additional Layout Options button
|
|
||||||
- expand "Key to choose 3rd level"
|
|
||||||
- deselect Right Alt
|
|
||||||
|
|
||||||
|
|
||||||
Nginx
|
|
||||||
=====
|
|
||||||
|
|
||||||
Log rotate /etc/logrotate.d/nginx:
|
|
||||||
size 100M
|
|
||||||
missingok
|
|
||||||
rotate 20
|
|
||||||
compress
|
|
||||||
delaycompress
|
|
||||||
notifempty
|
|
||||||
create 0640 www-data adm
|
|
||||||
|
|
||||||
Logging /etc/nginx/nginx.conf:
|
|
||||||
# Make sure to copy the GeoIP files!
|
|
||||||
geoip_country /usr/share/GeoIP/GeoIP.dat;
|
|
||||||
geoip_city /usr/share/GeoIP/GeoIPCity.dat;
|
|
||||||
log_format tannersformat '[$time_iso8601] $remote_addr ($geoip_city, $geoip_country_code) $request_method "$server_name$request_uri" $status "$http_referer" "$http_user_agent"';
|
|
||||||
access_log /var/log/nginx/access.log tannersformat;
|
|
||||||
error_log /var/log/nginx/error.log;
|
|
||||||
|
|
||||||
$ wget https://t0.vc/f/GeoIPCity.dat
|
|
||||||
$ sudo mv GeoIPCity.dat /usr/share/GeoIP/GeoIPCity.dat
|
|
||||||
|
|
||||||
|
|
||||||
OpenVPN
|
|
||||||
=======
|
|
||||||
|
|
||||||
Setup:
|
|
||||||
$ sudo su root
|
|
||||||
- follow steps here:
|
|
||||||
- https://wiki.debian.org/OpenVPN#TLS-enabled_VPN
|
|
||||||
- skip editing vars
|
|
||||||
- add random data to /etc/openvpn/easy-rsa/pki/.rnd to get rid of error messages
|
|
||||||
- use the # ./easyrsa [command] methods
|
|
||||||
- encrypt CA with password
|
|
||||||
- build the optional intermediate CA
|
|
||||||
- https://wiki.debian.org/OpenVPN#Static-Key_VPN
|
|
||||||
- improves security
|
|
||||||
- set auth SHA256
|
|
||||||
- save config file to /etc/openvpn/server.conf
|
|
||||||
- * set root's shell back to /bin/false *
|
|
||||||
|
|
||||||
Static IP:
|
|
||||||
- create a client (ie. "mediaserver") with easyrsa
|
|
||||||
$ mkdir /etc/openvpn/ccd
|
|
||||||
- edit /etc/openvpn/ccd/mediaserver:
|
|
||||||
ifconfig-push 10.8.0.100 255.255.255.0
|
|
||||||
- edit /etc/openvpn/server.conf:
|
|
||||||
client-config-dir /etc/openvpn/ccd
|
|
||||||
|
|
||||||
Routing / port forward:
|
|
||||||
- edit /etc/sysctl.conf:
|
|
||||||
net.ipv4.ip_forward=1
|
|
||||||
- edit /etc/default/ufw:
|
|
||||||
DEFAULT_FORWARD_POLICY="ACCEPT"
|
|
||||||
- edit /etc/ufw/before.rules at the top:
|
|
||||||
*nat
|
|
||||||
:POSTROUTING ACCEPT [0:0]
|
|
||||||
# ssh port forwarding
|
|
||||||
-A PREROUTING -d 159.203.223.101 -p tcp --dport 43655 -j DNAT --to-dest 10.8.0.100:43655
|
|
||||||
-A POSTROUTING -d 10.8.0.100 -p tcp --dport 43655 -j SNAT --to-source 10.8.0.1
|
|
||||||
# Allow traffic from OpenVPN client to eth0
|
|
||||||
-A POSTROUTING -s 10.8.0.0/8 -o eth0 -j MASQUERADE
|
|
||||||
COMMIT
|
|
||||||
$ sudo ufw disable && sudo ufw enable
|
|
||||||
$ sudo sysctl net.ipv4.ip_forward=1
|
|
||||||
- source: https://gist.github.com/kimus/9315140
|
|
||||||
|
|
||||||
Systemd fix:
|
|
||||||
- ensure config file is at /etc/openvpn/server.conf
|
|
||||||
$ sudo systemctl start openvpn@server
|
|
||||||
$ sudo systemctl enable openvpn@client
|
|
||||||
$ sudo systemctl daemon-reload
|
|
||||||
$ sudo service openvpn restart
|
|
||||||
- verify stop / start with ps aux | grep openvpn
|
|
||||||
- do same for "client"
|
|
||||||
- source: https://ubuntu.com/server/docs/service-openvpn
|
|
||||||
|
|
||||||
Systemd client:
|
|
||||||
$ sudo mv vpn2-client.ovpn /etc/openvpn/client.conf
|
|
||||||
$ sudo chown root:root /etc/openvpn/client.conf
|
|
||||||
$ sudo chmod 600 /etc/openvpn/client.conf
|
|
||||||
- if there's a password:
|
|
||||||
$ sudo -E vim /etc/openvpn/auth.txt
|
|
||||||
$ sudo chmod 600 /etc/openvpn/auth.txt
|
|
||||||
- add password to file
|
|
||||||
- add "askpass /etc/openvpn/auth.txt" to config file
|
|
||||||
- set up systemd:
|
|
||||||
$ sudo systemctl start openvpn@client
|
|
||||||
$ sudo systemctl enable openvpn@client
|
|
||||||
$ sudo systemctl daemon-reload
|
|
||||||
$ sudo service openvpn restart
|
|
||||||
|
|
||||||
Disable routing traffic over VPN:
|
|
||||||
- remove all "redirect-gateway" lines in client config
|
|
||||||
|
|
||||||
Gnome client:
|
|
||||||
- vpn settings, add
|
|
||||||
- import from file, select vpn2-client.ovpn
|
|
||||||
- add missing private key from /home/tanner/.cert/nm-openvpn/
|
|
||||||
- add password gush-tilt-shine-chute-pace-gecko
|
|
||||||
|
|
||||||
|
|
||||||
New Desktop
|
|
||||||
-----------
|
|
||||||
|
|
||||||
$ sudo apt install git tree htop byobu unattended-upgrades curl axel man-db vim vim-gtk netcat xfce4-terminal firefox chromium keepassxc mpv network-manager-openvpn-gnome bash-completion xdotool mlocate ncdu
|
|
||||||
$ sudo apt remove firefox-esr
|
|
||||||
- set up home directory...
|
|
||||||
|
|
||||||
Firefox extentions:
|
|
||||||
- Cookie AutoDelete
|
|
||||||
- Decentraleyes
|
|
||||||
- HTTPS Everywhere
|
|
||||||
- I dont care about cookies
|
|
||||||
- New Tab Override
|
|
||||||
- NoScript
|
|
||||||
- Privacy Badger
|
|
||||||
- SponsorBlock
|
|
||||||
- uBlock Origin
|
|
||||||
|
|
||||||
Fix popping after audio stops (disable audio power save):
|
|
||||||
$ sudo bash -c 'echo 0 > /sys/module/snd_hda_intel/parameters/power_save'
|
|
||||||
- to persist append to /etc/modprobe.d/audio_disable_powersave.conf:
|
|
||||||
options snd_hda_intel power_save=0
|
|
||||||
|
|
@@ -1,41 +0,0 @@
|
|||||||
Notes from Andy
|
|
||||||
---------------
|
|
||||||
|
|
||||||
Mastering your mind:
|
|
||||||
- can you control yourself?
|
|
||||||
- can you sit still physically?
|
|
||||||
- can you control your mind?
|
|
||||||
- can you concentrate on a simple object and nothing else?
|
|
||||||
- can you have no thoughts?
|
|
||||||
- can you free your mind from remembering the past or future?
|
|
||||||
- can you have no visual images / sounds?
|
|
||||||
- can you stop your inner monologue?
|
|
||||||
|
|
||||||
|
|
||||||
How to meditate:
|
|
||||||
- these steps are very gradual, not distinct steps:
|
|
||||||
- master focusing in the present (1-2 years)
|
|
||||||
- disregard the past and future
|
|
||||||
- focus on noises in the present. can jump around or listen to all.
|
|
||||||
- on failure gently pull back to the present
|
|
||||||
- mastery when you can do this for an hour
|
|
||||||
- can start with shorter sessions
|
|
||||||
- master focusing only a single element in the present
|
|
||||||
- for example, your breath
|
|
||||||
- master stopping the monologue
|
|
||||||
- stop talking to yourself
|
|
||||||
- stop making comments
|
|
||||||
- stop the chatter
|
|
||||||
- master total absorption into that single element
|
|
||||||
- deeper focus into the element
|
|
||||||
- Samadhi state
|
|
||||||
- can only experience your own, dont read the wiki
|
|
||||||
- Andy reached this only once, he felt omnipotent
|
|
||||||
|
|
||||||
- this becomes an intrinsic skill like talking and walking rather than a motor skill like throwing?
|
|
||||||
- if you dont use it you lose it?
|
|
||||||
- one you reach Samadhi your mind always meditates
|
|
||||||
|
|
||||||
|
|
||||||
Naval theory:
|
|
||||||
https://twitter.com/naval/status/1261481222359801856
|
|
@@ -1,170 +0,0 @@
|
|||||||
aka notetaking
|
|
||||||
|
|
||||||
Solutions
|
|
||||||
=========
|
|
||||||
|
|
||||||
Desires
|
|
||||||
-------
|
|
||||||
|
|
||||||
- Open source
|
|
||||||
- End to end encryption
|
|
||||||
- Portable data store - md (or exportable)
|
|
||||||
- Images
|
|
||||||
- Rich text editor WYSIWYG
|
|
||||||
- Linking notes together
|
|
||||||
- to whole note or header in note
|
|
||||||
- Sync
|
|
||||||
- Mobile support
|
|
||||||
- Folders
|
|
||||||
- Undo / versioning
|
|
||||||
|
|
||||||
|
|
||||||
Reviews
|
|
||||||
-------
|
|
||||||
|
|
||||||
Joplin:
|
|
||||||
- UI is very fast
|
|
||||||
- has its own sync server now, wait to mature?
|
|
||||||
- scroll in render view glitchy / laggy when zoomed
|
|
||||||
- WYSIWYG editor breaks some markdown
|
|
||||||
- clicking links in WYSIWYG requires ctrl
|
|
||||||
- can't see note names in notebook tree, so will be hard to find
|
|
||||||
- maybe that's better?
|
|
||||||
- mobile app lacks WYSIWYG
|
|
||||||
- mobile app md editor scroll shitty
|
|
||||||
- slow to edit notes in mobile app
|
|
||||||
- white flashes on dark mode desktop theme when switching notebooks
|
|
||||||
- Todo feature is cool. can make each note a todo and use the body to add context / info
|
|
||||||
- easy to rearrange todos
|
|
||||||
|
|
||||||
Obsidian:
|
|
||||||
- highly reviewed, looks sexy but needs more contrast
|
|
||||||
- no WYSIWYG editor yet - planned
|
|
||||||
- has graph and backlinks
|
|
||||||
- not open source
|
|
||||||
- files stored as plain text
|
|
||||||
|
|
||||||
|
|
||||||
Wiki.js:
|
|
||||||
- Supports LaTeX
|
|
||||||
- Support Markdown (it also supports formats such as html)
|
|
||||||
- Works in-browser (and therefore can be accessed on any device)
|
|
||||||
- Editing is easy (although this sounds like a "duh" feature, many self-hosted note apps are more like static site generators)
|
|
||||||
- Uploading files is simple
|
|
||||||
- Has multiple backup options (I use GitHub and .gitignore the textbooks)
|
|
||||||
|
|
||||||
|
|
||||||
Boostnote:
|
|
||||||
- no mobile support
|
|
||||||
|
|
||||||
Trilium:
|
|
||||||
- great encryption
|
|
||||||
- poor mobile support, Dom uses telegram as a buffer
|
|
||||||
- fully tried it, mobile is just too broken
|
|
||||||
- doesnt scroll all the way to the bottom of folders and note contents
|
|
||||||
- lots of other minor bugs
|
|
||||||
- parts of UI not updating like archived notes
|
|
||||||
- randomly refreshes the page
|
|
||||||
- header sizes all look the same
|
|
||||||
- today note button is slow to load
|
|
||||||
|
|
||||||
Simplenote:
|
|
||||||
- not self-hosted
|
|
||||||
- no folders
|
|
||||||
|
|
||||||
Turtl:
|
|
||||||
- buggy app
|
|
||||||
- bad organization system
|
|
||||||
|
|
||||||
Org-mode
|
|
||||||
- needs emacs
|
|
||||||
|
|
||||||
Taskwarrior:
|
|
||||||
- command line only
|
|
||||||
|
|
||||||
Zim:
|
|
||||||
- no built in sync
|
|
||||||
- no mobile
|
|
||||||
|
|
||||||
TiddlyWiki
|
|
||||||
- no built in sync
|
|
||||||
- one html file
|
|
||||||
- modern browsers block some file features?
|
|
||||||
|
|
||||||
https://collectednotes.com/
|
|
||||||
- no android
|
|
||||||
- watch them
|
|
||||||
|
|
||||||
https://github.com/athensresearch/athens
|
|
||||||
- not finished, keep an eye on
|
|
||||||
- ugly theme
|
|
||||||
|
|
||||||
Outline:
|
|
||||||
- https://www.getoutline.com/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Zenkit: proprietary
|
|
||||||
OneNote: proprietary
|
|
||||||
Google Keep: proprietary
|
|
||||||
Synapbook: proprietary
|
|
||||||
Workflowy: proprietary
|
|
||||||
Notion: proprietary, UX issues: https://news.t0.vc/DCGM
|
|
||||||
Roam Research: proprietary, cool graph feature though
|
|
||||||
RemNote: proprietary, spaced repetition
|
|
||||||
|
|
||||||
|
|
||||||
https://contexted.io/
|
|
||||||
https://rwtxt.com
|
|
||||||
|
|
||||||
Stuff to read:
|
|
||||||
https://news.t0.vc/YUAT/c
|
|
||||||
https://news.t0.vc/WLJJ/c
|
|
||||||
https://news.t0.vc/ORXL/c
|
|
||||||
https://old.reddit.com/r/CGPGrey/comments/ihkqjp/cortex_105_atomic_notes/
|
|
||||||
|
|
||||||
|
|
||||||
The perfect note-taking app:
|
|
||||||
https://www.youtube.com/watch?v=wpcVQeF07G4
|
|
||||||
- goes over the three types of note-takers
|
|
||||||
- librarian: likes to catalogue, usually write-only -> evernote
|
|
||||||
- gardener: likes connecting ideas in their own way -> roam
|
|
||||||
- architect: likes designing processes and structure -> notion
|
|
||||||
|
|
||||||
|
|
||||||
Formatting / Template
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Unformatted info can just be sentences, paragraphs, or points.
|
|
||||||
|
|
||||||
|
|
||||||
Section
|
|
||||||
=======
|
|
||||||
|
|
||||||
Place two empty lines before the section header, empty line after
|
|
||||||
|
|
||||||
|
|
||||||
Subsection
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Sub-subsection:
|
|
||||||
No linebreak for text within a section
|
|
||||||
|
|
||||||
Generic lists or steps:
|
|
||||||
- dash then a space
|
|
||||||
- lower case for prose
|
|
||||||
- Data points: gets capital
|
|
||||||
- like this
|
|
||||||
- sublists
|
|
||||||
- two spaces, dash, space
|
|
||||||
|
|
||||||
Todo lists:
|
|
||||||
o unfinished task
|
|
||||||
v finished task (looks like check mark)
|
|
||||||
x cancelled task
|
|
||||||
|
|
||||||
- I wonder if I should just use markdown?
|
|
||||||
|
|
||||||
* notes to consider
|
|
||||||
$ commands to run
|
|
||||||
|
|
@@ -1,39 +0,0 @@
|
|||||||
Development Setup:
|
|
||||||
$ sudo apt install python3 python3-pip python-virtualenv python3-virtualenv
|
|
||||||
$ virtualenv -p python3 env
|
|
||||||
$ . env/bin/activate
|
|
||||||
$ pip install -r requirements.txt
|
|
||||||
|
|
||||||
Django clone setup:
|
|
||||||
$ python manage.py makemigrations
|
|
||||||
$ python manage.py migrate
|
|
||||||
$ python manage.py createsuperuser
|
|
||||||
$ DEBUG=true python manage.py runserver 0.0.0.0:8000
|
|
||||||
|
|
||||||
|
|
||||||
Logging:
|
|
||||||
|
|
||||||
use logger.exception
|
|
||||||
|
|
||||||
Machine learning:
|
|
||||||
comma.ai switched to pyTorch
|
|
||||||
|
|
||||||
|
|
||||||
How to make a package:
|
|
||||||
https://news.t0.vc/ZBPS
|
|
||||||
|
|
||||||
|
|
||||||
Timezones
|
|
||||||
=========
|
|
||||||
|
|
||||||
NEVER USE .replace(tzinfo= EXCEPT FOR WITH UTC!
|
|
||||||
|
|
||||||
Assigning timezone to parsed string:
|
|
||||||
- example, you get a text timestamp and parse it with strptime
|
|
||||||
- solution:
|
|
||||||
t = datetime.strptime(timestamp, '%Y-%m-%d %H:%M:%S')
|
|
||||||
tz = pytz.timezone('America/Edmonton')
|
|
||||||
result = tz.localize(t)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@@ -1,70 +0,0 @@
|
|||||||
Barcelona:
|
|
||||||
- very touristy
|
|
||||||
|
|
||||||
Tarragona:
|
|
||||||
- 20 minutes south of Barcelona
|
|
||||||
- much cheaper and more historical
|
|
||||||
- Roman ruins are still there
|
|
||||||
- very close to the ocean
|
|
||||||
- lots of walking
|
|
||||||
- Tim stayed at Olivia hotel
|
|
||||||
- 100 m from Mediterranian
|
|
||||||
- right on the giant town plaza
|
|
||||||
- Amphithéâtre, Aqueducts, walls
|
|
||||||
|
|
||||||
Cervera:
|
|
||||||
- 25200 Lleida
|
|
||||||
- Tim's wife taught
|
|
||||||
- zero english
|
|
||||||
- train goes from Barcelona
|
|
||||||
- crazy festivals every ten days:
|
|
||||||
https://www.youtube.com/watch?v=kr03rCwa9ms
|
|
||||||
|
|
||||||
Malaga:
|
|
||||||
- city with the most soul
|
|
||||||
- nice beaches
|
|
||||||
- poorer
|
|
||||||
|
|
||||||
Granada:
|
|
||||||
- **alhambra: palace of the largest islamic empire, book ahead
|
|
||||||
- alkazah
|
|
||||||
|
|
||||||
*Alhambra:
|
|
||||||
- 'Remember to be punctual to access the Nasrid Palaces at the time selected on your ticket. The rest of the monument can be visited from 8:30 a.m. to 6:00 p.m. winter; 8:30 a.m. to 8:00 p.m. summer.'
|
|
||||||
- random document number 10L-ID10T
|
|
||||||
- Booking Reference Number: H0DIOBJ
|
|
||||||
|
|
||||||
Valencia:
|
|
||||||
- good flee market
|
|
||||||
|
|
||||||
Seville:
|
|
||||||
- odai's friend owns restaurant
|
|
||||||
- alcazar
|
|
||||||
- plaza de espana
|
|
||||||
- opera?
|
|
||||||
- Diego Velázquez birthplace?
|
|
||||||
|
|
||||||
|
|
||||||
Portugal
|
|
||||||
========
|
|
||||||
|
|
||||||
Lagos:
|
|
||||||
- Brassao restaurant very good
|
|
||||||
- sunset
|
|
||||||
|
|
||||||
Lisbon:
|
|
||||||
- a bit dirty
|
|
||||||
- have low expectations
|
|
||||||
|
|
||||||
Sintra:
|
|
||||||
- look like disney
|
|
||||||
- actual castle
|
|
||||||
- 45 min train from Lisbon
|
|
||||||
|
|
||||||
Porto:
|
|
||||||
- beautiful
|
|
||||||
- odai like better than lisbon
|
|
||||||
- on a cliffside
|
|
||||||
- where harry potter started
|
|
||||||
|
|
||||||
|
|
@@ -1,34 +0,0 @@
|
|||||||
Enter word under cursor into cmdline:
|
|
||||||
CTRL-R CTRL-W
|
|
||||||
(:help c_CTRL-R)
|
|
||||||
|
|
||||||
Rewrap text (reformat):
|
|
||||||
gq
|
|
||||||
|
|
||||||
Remove duplicates from file:
|
|
||||||
vim ~/.ssh/authorized_keys +":sort u|wq"
|
|
||||||
|
|
||||||
N ctrl-^ goes to buffer N
|
|
||||||
|
|
||||||
Centre current line on screen:
|
|
||||||
zz
|
|
||||||
|
|
||||||
Newrw:
|
|
||||||
- fixed on left: :20Lexplore
|
|
||||||
- change to tree: i
|
|
||||||
- toggle .hidden files: gh
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Config
|
|
||||||
======
|
|
||||||
|
|
||||||
Start Vim without reading .vimrc:
|
|
||||||
vim -u NONE
|
|
||||||
|
|
||||||
Minimal sane config:
|
|
||||||
set encoding=utf-8
|
|
||||||
set nocompatible
|
|
||||||
set background=dark
|
|
||||||
set hidden
|
|
||||||
|
|
@@ -34,12 +34,7 @@ MARKDOWN = {
|
|||||||
'output_format': 'html5',
|
'output_format': 'html5',
|
||||||
}
|
}
|
||||||
|
|
||||||
PLUGINS = [
|
STATIC_PATHS = ['images', 'extra']
|
||||||
'obsidian',
|
|
||||||
'linkclass',
|
|
||||||
]
|
|
||||||
|
|
||||||
STATIC_PATHS = ['media', 'extra']
|
|
||||||
|
|
||||||
EXTRA_PATH_METADATA = {
|
EXTRA_PATH_METADATA = {
|
||||||
'extra/favicon.svg': {'path': 'favicon.svg'},
|
'extra/favicon.svg': {'path': 'favicon.svg'},
|
||||||
|
@@ -1,74 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*- #
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
import os
|
|
||||||
|
|
||||||
AUTHOR = 'Tanner Collin'
|
|
||||||
SITENAME = 'Tanner Collin'
|
|
||||||
SITEURL = ''
|
|
||||||
|
|
||||||
PATH = 'content'
|
|
||||||
|
|
||||||
TIMEZONE = 'Canada/Mountain'
|
|
||||||
|
|
||||||
DEFAULT_LANG = 'en'
|
|
||||||
|
|
||||||
# Feed generation is usually not desired when developing
|
|
||||||
FEED_ALL_ATOM = None
|
|
||||||
CATEGORY_FEED_ATOM = None
|
|
||||||
TRANSLATION_FEED_ATOM = None
|
|
||||||
AUTHOR_FEED_ATOM = None
|
|
||||||
AUTHOR_FEED_RSS = None
|
|
||||||
|
|
||||||
DEFAULT_PAGINATION = False
|
|
||||||
|
|
||||||
MARKDOWN = {
|
|
||||||
'extension_configs': {
|
|
||||||
'markdown.extensions.codehilite': {'css_class': 'highlight'},
|
|
||||||
'markdown.extensions.extra': {},
|
|
||||||
'markdown.extensions.meta': {},
|
|
||||||
'markdown.extensions.toc': {
|
|
||||||
'toc_depth': '2-3',
|
|
||||||
'anchorlink': True,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'output_format': 'html5',
|
|
||||||
}
|
|
||||||
|
|
||||||
PLUGINS = [
|
|
||||||
'obsidian',
|
|
||||||
'linkclass',
|
|
||||||
]
|
|
||||||
|
|
||||||
STATIC_PATHS = ['media', 'extra', 'text']
|
|
||||||
|
|
||||||
EXTRA_PATH_METADATA = {
|
|
||||||
#'extra/favicon.svg': {'path': 'favicon.svg'},
|
|
||||||
}
|
|
||||||
|
|
||||||
# Uncomment following line if you want document-relative URLs when developing
|
|
||||||
#RELATIVE_URLS = True
|
|
||||||
|
|
||||||
THEME = 'themes/lite'
|
|
||||||
|
|
||||||
# turn off useless outputs
|
|
||||||
TAG_SAVE_AS = ''
|
|
||||||
CATEGORY_SAVE_AS = ''
|
|
||||||
AUTHOR_SAVE_AS = ''
|
|
||||||
ARCHIVES_SAVE_AS = ''
|
|
||||||
AUTHORS_SAVE_AS = ''
|
|
||||||
CATEGORIES_SAVE_AS = ''
|
|
||||||
TAGS_SAVE_AS = ''
|
|
||||||
|
|
||||||
INDEX_SAVE_AS = '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
|
|
@@ -1,17 +0,0 @@
|
|||||||
<style>
|
|
||||||
body {background: #eee; font: 1.1rem/1.5 serif;}
|
|
||||||
h1, h2 {margin-left: -24; font-family: sans-serif;}
|
|
||||||
a {text-decoration: none; color: #000; border-bottom: 1px solid #000;}
|
|
||||||
</style>
|
|
||||||
<div style="max-width: 600; margin: auto">
|
|
||||||
<h1>Tanner Collin</h1>
|
|
||||||
<p> Hi, I'm Tanner! I do firmware and web development in Calgary.</p>
|
|
||||||
<a href="/">Contact</a> |
|
|
||||||
<a href="/r">Resume</a> |
|
|
||||||
<a href="/p">Projects</a> |
|
|
||||||
<a href="/c">Creations</a> |
|
|
||||||
<a href="/w">Writing</a>
|
|
||||||
<h2>Contact Info</h2>
|
|
||||||
<p>Email: <a href="mailto:site2@tannercollin.com">site2@tannercollin.com</a></p>
|
|
||||||
<p>Telegram: <a href="https://t.me/tannercollin">@tannercollin</a></p>
|
|
||||||
</div>
|
|
@@ -34,12 +34,7 @@ MARKDOWN = {
|
|||||||
'output_format': 'html5',
|
'output_format': 'html5',
|
||||||
}
|
}
|
||||||
|
|
||||||
PLUGINS = [
|
STATIC_PATHS = ['images', 'extra']
|
||||||
'obsidian',
|
|
||||||
'linkclass',
|
|
||||||
]
|
|
||||||
|
|
||||||
STATIC_PATHS = ['media', 'extra']
|
|
||||||
|
|
||||||
EXTRA_PATH_METADATA = {
|
EXTRA_PATH_METADATA = {
|
||||||
'extra/favicon.svg': {'path': 'favicon.svg'},
|
'extra/favicon.svg': {'path': 'favicon.svg'},
|
||||||
|
@@ -1,74 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*- #
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
import os
|
|
||||||
|
|
||||||
AUTHOR = 'Tanner Collin'
|
|
||||||
SITENAME = 'Tanner Collin'
|
|
||||||
SITEURL = ''
|
|
||||||
|
|
||||||
PATH = 'content'
|
|
||||||
|
|
||||||
TIMEZONE = 'Canada/Mountain'
|
|
||||||
|
|
||||||
DEFAULT_LANG = 'en'
|
|
||||||
|
|
||||||
# Feed generation is usually not desired when developing
|
|
||||||
FEED_ALL_ATOM = None
|
|
||||||
CATEGORY_FEED_ATOM = None
|
|
||||||
TRANSLATION_FEED_ATOM = None
|
|
||||||
AUTHOR_FEED_ATOM = None
|
|
||||||
AUTHOR_FEED_RSS = None
|
|
||||||
|
|
||||||
DEFAULT_PAGINATION = False
|
|
||||||
|
|
||||||
MARKDOWN = {
|
|
||||||
'extension_configs': {
|
|
||||||
'markdown.extensions.codehilite': {'css_class': 'highlight'},
|
|
||||||
'markdown.extensions.extra': {},
|
|
||||||
'markdown.extensions.meta': {},
|
|
||||||
'markdown.extensions.toc': {
|
|
||||||
'toc_depth': '2-3',
|
|
||||||
'anchorlink': True,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'output_format': 'html5',
|
|
||||||
}
|
|
||||||
|
|
||||||
PLUGINS = [
|
|
||||||
'obsidian',
|
|
||||||
'linkclass',
|
|
||||||
]
|
|
||||||
|
|
||||||
STATIC_PATHS = ['media', 'extra', 'text']
|
|
||||||
|
|
||||||
EXTRA_PATH_METADATA = {
|
|
||||||
#'extra/favicon.svg': {'path': 'favicon.svg'},
|
|
||||||
}
|
|
||||||
|
|
||||||
# Uncomment following line if you want document-relative URLs when developing
|
|
||||||
#RELATIVE_URLS = True
|
|
||||||
|
|
||||||
THEME = 'themes/lite'
|
|
||||||
|
|
||||||
# turn off useless outputs
|
|
||||||
TAG_SAVE_AS = ''
|
|
||||||
CATEGORY_SAVE_AS = ''
|
|
||||||
AUTHOR_SAVE_AS = ''
|
|
||||||
ARCHIVES_SAVE_AS = ''
|
|
||||||
AUTHORS_SAVE_AS = ''
|
|
||||||
CATEGORIES_SAVE_AS = ''
|
|
||||||
TAGS_SAVE_AS = ''
|
|
||||||
|
|
||||||
INDEX_SAVE_AS = '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 = True
|
|
@@ -1,16 +0,0 @@
|
|||||||
blinker==1.4
|
|
||||||
commonmark==0.9.1
|
|
||||||
docutils==0.18.1
|
|
||||||
feedgenerator==2.0.0
|
|
||||||
Jinja2==3.1.2
|
|
||||||
Markdown==3.3.6
|
|
||||||
MarkupSafe==2.1.1
|
|
||||||
pelican==4.7.2
|
|
||||||
pelican-linkclass==2.0.2
|
|
||||||
pelican-obsidian @ git+https://git.tannercollin.com/tanner/pelican-obsidian.git@41dd1d649127ae2833f5a4b1c3b6b6cb571117d8
|
|
||||||
Pygments==2.12.0
|
|
||||||
python-dateutil==2.8.2
|
|
||||||
pytz==2022.1
|
|
||||||
rich==12.3.0
|
|
||||||
six==1.16.0
|
|
||||||
Unidecode==1.3.4
|
|
@@ -1,88 +0,0 @@
|
|||||||
{% extends "base.html" %}
|
|
||||||
{% block meta %}
|
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<title>{{ article.title|striptags }} | t0.vc</title>
|
|
||||||
<meta charset=UTF-8>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
{% if article.date %}
|
|
||||||
<meta name="date" content="{{article.date}}" />
|
|
||||||
{% endif %}
|
|
||||||
{% if article.summary %}
|
|
||||||
<meta name="description" content="{{article.summary|striptags}}" />
|
|
||||||
<meta name="summary" content="{{article.summary|striptags}}" />
|
|
||||||
{% endif %}
|
|
||||||
{% if article.category %}
|
|
||||||
<meta name="category" content="{{article.category}}" />
|
|
||||||
{% endif %}
|
|
||||||
{% for tag in article.tags %}
|
|
||||||
<meta name="tags" content="{{tag}}" />
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block style %}
|
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
a.external {
|
|
||||||
background-image: url("data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12'%3E%3Cpath fill='%23fff' stroke='%23000' d='M1.5 4.518h5.982V10.5H1.5z'/%3E%3Cpath fill='%23000' d='M5.765 1H11v5.39L9.427 7.937l-1.31-1.31L5.393 9.35l-2.69-2.688 2.81-2.808L4.2 2.544z'/%3E%3Cpath fill='%23fff' d='m9.995 2.004.022 4.885L8.2 5.07 5.32 7.95 4.09 6.723l2.882-2.88-1.85-1.852z'/%3E%3C/svg%3E%0A");
|
|
||||||
background-position: center right;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
padding-right: 15px;
|
|
||||||
}
|
|
||||||
.toclink:not(:hover) {
|
|
||||||
text-decoration: none;
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
.content {
|
|
||||||
max-width: 600px;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
.toclink {
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
.highlight > pre {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0.5rem;
|
|
||||||
overflow-x: auto;
|
|
||||||
background-color: #eee;
|
|
||||||
}
|
|
||||||
:not(pre)>code {
|
|
||||||
padding: 0 2px;
|
|
||||||
font-size: 0.8rem;
|
|
||||||
background-color: #eee;
|
|
||||||
}
|
|
||||||
.aside {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.toc {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
img:not(.floated) {
|
|
||||||
width: 600px;
|
|
||||||
max-width: 100%;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
.floated {
|
|
||||||
float: left;
|
|
||||||
margin-right: 1rem;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<body>
|
|
||||||
<div class="content">
|
|
||||||
<p>← <a href="/">Return Home</a></p>
|
|
||||||
<h1>{{ article.title }}</h1>
|
|
||||||
{{ article.summary }}
|
|
||||||
{{ article.locale_date }}
|
|
||||||
<hr />
|
|
||||||
{{ article.content }}
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
{% endblock %}
|
|
@@ -1,2 +0,0 @@
|
|||||||
{% block meta %}{% endblock %}<link rel=icon href=data:,>{% block style %}{% endblock %}{% block content %}
|
|
||||||
{% endblock %}
|
|