diff --git a/archetypes/default.md b/archetypes/default.md index 00e77bd79be44872c0b29256b03799c2fb00c10d..a3b393e1e7a611cc737f84366ba71ad8e071db6b 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -2,5 +2,5 @@ title: "{{ replace .Name "-" " " | title }}" date: {{ .Date }} draft: true +cover: ./cover.png --- - diff --git a/content/_index.md b/content/_index.md index aa9d9a7ca2e79120359abceb152fa0058fb5132a..ff520db45f3ee2fec46b2e9a222103a15ce3b1ae 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,6 +1,7 @@ --- title: Welcome! layout: home +cover: ./cover.png --- ## Welcome! diff --git a/content/posts/2020-03-21-email-privacy-security-concerns.md b/content/posts/2020-03-21-email-privacy-security-concerns.md index 1d57a3a31eefeb7327190cb050e6f8bbf2a6adb6..62bb6e520aaed23b91f68db91b085ca0b7c111b4 100644 --- a/content/posts/2020-03-21-email-privacy-security-concerns.md +++ b/content/posts/2020-03-21-email-privacy-security-concerns.md @@ -1,6 +1,7 @@ --- layout: post title: Email & privacy/security concerns +cover: ./cover.png date: 2020-03-21 01:46 -0400 draft: true --- diff --git a/content/posts/a-perfect-email-setup-for-me.md b/content/posts/a-perfect-email-setup-for-me.md index ab414439f0d695ef1049e77ee7abc8c73c79b2d2..b0c55a49ef5e99df5643d759deb1d312c23dbaad 100644 --- a/content/posts/a-perfect-email-setup-for-me.md +++ b/content/posts/a-perfect-email-setup-for-me.md @@ -1,6 +1,7 @@ --- title: "A perfect email setup (for me)" author: ["Amolith"] +cover: ./cover.png lastmod: 2023-01-27T13:00:36-05:00 tags: ["Email", "Workflow"] categories: ["Technology"] diff --git a/content/posts/abusing-mesh-networks-for-easy-remote-support.md b/content/posts/abusing-mesh-networks-for-easy-remote-support.md index f4eabd9ab0dc1936a89efd61d0dbdc3714d38145..2d9ea0d59c0d15deb8abd9a898109c5d8000951e 100644 --- a/content/posts/abusing-mesh-networks-for-easy-remote-support.md +++ b/content/posts/abusing-mesh-networks-for-easy-remote-support.md @@ -1,6 +1,7 @@ --- title: "(Ab)using mesh networks for easy remote support" author: ["Amolith"] +cover: ./cover.png date: 2021-11-01T02:51:00-04:00 lastmod: 2023-01-18T09:33:39-05:00 tags: ["Mesh networking", "Open source", "Remote support"] @@ -27,7 +28,6 @@ networking tool created by Slack, [X11vnc,](https://libvnc.github.io/) a very mi distribution, to set up a scalable, secure, and simple setup reminiscent of products like RealVNC. - ## Nebula {#nebula} The first part of our stack is Nebula, the tool that creates a network @@ -63,7 +63,6 @@ It allows any node to connect with any other node on any network from anywhere in the world, as long as one lighthouse is accessible that knows the connection details for both peers. - ### Getting started {#getting-started} The _best_ resource is [the official documentation,](https://github.com/slackhq/nebula) but I'll describe the @@ -77,7 +76,6 @@ purchase. [Hetzner](https://www.hetzner.com/cloud) (referral: `ckGrk4J45WdN`) or `36nc15758387844`) would also be very good options; I've used them all and am very comfortable recommending them. - ### Creating a Certificate Authority {#creating-a-certificate-authority} After picking a device with a static IP address, it needs to be set up @@ -97,7 +95,6 @@ CA's name in a later section. If you have your own domain, feel free to use that instead; it doesn't really matter what domain is used as long as the format is valid. - ### Generating lighthouse credentials {#generating-lighthouse-credentials} Now that we have the CA's `.crt` and `.key` files, we can create and sign @@ -114,12 +111,11 @@ of the following private IP ranges, I just happened to use `192.168.100.X` for my network. | IP Range | Number of addresses | -|-------------------------------|---------------------| +| ----------------------------- | ------------------- | | 10.0.0.0 – 10.255.255.255 | 16 777 216 | | 172.16.0.0 – 172.31.255.255 | 10 48 576 | | 192.168.0.0 – 192.168.255.255 | 65 536 | - ### Creating a config file {#creating-a-config-file} The next step is creating our lighthouse's config file. The reference @@ -134,10 +130,10 @@ to identify nodes by their configs. Once we copy everything over to the server, we'll add the proper paths to the `cert` and `key` fields. ```yaml - pki: - ca: /etc/nebula/ca.crt - cert: /etc/nebula/ - key: /etc/nebula/ +pki: + ca: /etc/nebula/ca.crt + cert: /etc/nebula/ + key: /etc/nebula/ ``` The next section is for identifying and mapping your lighthouses. This @@ -148,8 +144,8 @@ public IP address is. If you've used a different private network range, those changes need to be reflected here as well. ```yaml - static_host_map: - "192.168.100.1": ["XX.XX.XX.XX:4242"] +static_host_map: + "192.168.100.1": ["XX.XX.XX.XX:4242"] ``` Below, we're specifying how the node should behave. It is a lighthouse, @@ -160,14 +156,14 @@ is set to `true` though), and this lighthouse should not send reports to other lighthouses. The bit about DNS will be discussed later. ```yaml - lighthouse: - am_lighthouse: true - serve_dns: true - dns: - host: 0.0.0.0 - port: 53 - interval: 60 - hosts: +lighthouse: + am_lighthouse: true + serve_dns: true + dns: + host: 0.0.0.0 + port: 53 + interval: 60 + hosts: ``` The next bit is about [hole punching](https://en.wikipedia.org/wiki/Hole_punching_%28networking%29), also called _NAT punching_, _NAT @@ -180,10 +176,10 @@ connected to. We want to make sure devices are available no matter where they are. ```yaml - punchy: - punch: true - respond: true - delay: 1s +punchy: + punch: true + respond: true + delay: 1s ``` `cipher` is a big one. The value _must_ be identical on _all_ nodes _and_ @@ -194,7 +190,7 @@ that you won't need to work with _anything_ else, I recommend leaving it set to `chachapoly`. ```yaml - cipher: chachapoly +cipher: chachapoly ``` The last bit I modify is the firewall section. I leave most everything @@ -207,14 +203,13 @@ make those changes. Again, I _remove_ the following bit from the config. ```yaml - - port: 443 - proto: tcp - groups: - - laptop - - home +- port: 443 + proto: tcp + groups: + - laptop + - home ``` - ### Setting the lighthouse up {#setting-the-lighthouse-up} We've got the config, the certificates, and the keys. Now we're ready to @@ -241,10 +236,10 @@ The next step is copying the config, keys, and certificates to the server. I use `rsync` but you can use whatever you're comfortable with. The following four files need to be uploaded to the server. -- `config.yml` -- `ca.crt` -- `buyvm.lh.nebula.example.com.crt` -- `buyvm.lh.nebula.example.com.key` +- `config.yml` +- `ca.crt` +- `buyvm.lh.nebula.example.com.crt` +- `buyvm.lh.nebula.example.com.key` With `rsync`, that would look something like this. Make sure `rsync` is also installed on the VPS before attempting to run the commands though; @@ -268,10 +263,10 @@ Edit the config file and ensure the `pki:` section looks something like this, modified to match your hostnames of course. ```yaml - pki: - ca: /etc/nebula/ca.crt - cert: /etc/nebula/buyvm.lh.nebula.example.com.crt - key: /etc/nebula/buyvm.lh.nebula.example.com.key +pki: + ca: /etc/nebula/ca.crt + cert: /etc/nebula/buyvm.lh.nebula.example.com.crt + key: /etc/nebula/buyvm.lh.nebula.example.com.key ``` Run the following command to make sure everything works properly. @@ -305,7 +300,6 @@ options. We're almost done! - ### Setting individual nodes up {#setting-individual-nodes-up} This process is almost exactly the same as setting lighthouses up. All @@ -337,15 +331,15 @@ is one of the lighthouses it should report to and query from. If you have more than one lighthouse, add them to the list as well. ```yaml - lighthouse: - am_lighthouse: false - #serve_dns: false - #dns: - #host: 0.0.0.0 - #port: 53 - interval: 60 - hosts: - - "192.168.100.1" +lighthouse: + am_lighthouse: false + #serve_dns: false + #dns: + #host: 0.0.0.0 + #port: 53 + interval: 60 + hosts: + - "192.168.100.1" ``` The other bit that should be modified is the `firewall:` section and this @@ -364,21 +358,20 @@ on _your_ node allows any outbound connection, you'll be able to access other nodes. ```yaml - - port: 5900 - proto: tcp - groups: - - support - - - port: 22 - proto: tcp - groups: - - support +- port: 5900 + proto: tcp + groups: + - support + +- port: 22 + proto: tcp + groups: + - support ``` The certs, key, config, binary, and systemd service should all be copied to the same places on all of these nodes as on the lighthouse. - ## X11vnc {#x11vnc} _Alright._ The hardest part is finished. Now on to setting `x11vnc` up on @@ -410,7 +403,6 @@ distribution's documentation, or ask someone else that might know. After adding it to the startup application, log out and back in to make sure it's running in the background. - ## Remmina {#remmina} Now that our network is functioning properly and the VNC server is set @@ -434,7 +426,6 @@ Save and test the connection! If all goes well and you see the other device's desktop, you're done with the VNC section! Now on to SSH. - ## SSH {#ssh} First off, make sure `openssh-server` is installed on the remote node; @@ -520,7 +511,6 @@ Now you can just run `ssh USER` to get in. If you duplicate the above block for all of the remote nodes you need to support, you'll only have to remember the person's username to SSH into their machine. - ## Going further with Nebula {#going-further-with-nebula} This section explains why we used FQDNs in the certs and why the DNS diff --git a/content/posts/audacity-and-the-telemetry-pull-request.md b/content/posts/audacity-and-the-telemetry-pull-request.md index 21cc9699485204d4b13c06c64efdc042e9cc1b0d..41933733d81a03a85098d957fc646b16ae6f0972 100644 --- a/content/posts/audacity-and-the-telemetry-pull-request.md +++ b/content/posts/audacity-and-the-telemetry-pull-request.md @@ -1,6 +1,7 @@ --- title: "Audacity and the telemetry pull request" author: ["Amolith"] +cover: ./cover.png lastmod: 2023-01-27T13:00:37-05:00 tags: ["Open source culture", "Audio editing", "Music", "Drama"] categories: ["Technology"] diff --git a/content/posts/dopamine-dispensers.md b/content/posts/dopamine-dispensers.md index 7d40a2400d13db2c917b9d6106ae7e6d8b89659c..72cf8009d3175754cd6a8afa32ee2fed7c204b76 100644 --- a/content/posts/dopamine-dispensers.md +++ b/content/posts/dopamine-dispensers.md @@ -2,6 +2,7 @@ title: "The case for dopamine dispensers" subtitles: "Likes and clicks and green badges and comments and analytics and ____ can be helpful, actually" author: ["Amolith"] +cover: ./cover.png published: 2023-02-26T23:09:00-05:00 categories: ["Technology"] tags: ["TODO"] diff --git a/content/posts/email-can-be-pleasant-but-it-takes-work.md b/content/posts/email-can-be-pleasant-but-it-takes-work.md index 657b5d95971e9e3562f0496c527ff2f61cfe83e6..f46e81a14ffd32e16dd30d122f3b9dce1b07d66c 100644 --- a/content/posts/email-can-be-pleasant-but-it-takes-work.md +++ b/content/posts/email-can-be-pleasant-but-it-takes-work.md @@ -1,6 +1,7 @@ --- title: "Email can be pleasant, but like all good things, it takes work" author: ["Amolith"] +cover: ./cover.png lastmod: 2023-01-27T13:00:36-05:00 categories: ["Meta"] draft: true diff --git a/content/posts/focus-intentionally.md b/content/posts/focus-intentionally.md index ca783f093085de3bb0d3c2e01761a14b26f7a294..42fb91ee1968631dcf396e70341db1f7cc2ed338 100644 --- a/content/posts/focus-intentionally.md +++ b/content/posts/focus-intentionally.md @@ -1,6 +1,7 @@ --- title: "Focus intentionally" author: Amolith +cover: ./cover.png lastmod: 2022-04-23T21:12:29-04:00 categories: ["Meta"] draft: true diff --git a/content/posts/freebsd-quirks-on-the-framework-laptop.md b/content/posts/freebsd-quirks-on-the-framework-laptop.md index 29e90d318297e259c45f41c7fd75dfa1b09d13e9..f16a3fdb3572eefc0f7a26d5eb6157132f4cf348 100644 --- a/content/posts/freebsd-quirks-on-the-framework-laptop.md +++ b/content/posts/freebsd-quirks-on-the-framework-laptop.md @@ -1,6 +1,7 @@ --- title: "FreeBSD quirks on the Framework laptop" author: ["Amolith"] +cover: ./cover.png lastmod: 2022-04-23T21:14:54-04:00 tags: ["FreeBSD", "Framework"] categories: ["Technology"] diff --git a/content/posts/making-yourself-overly-available.md b/content/posts/making-yourself-overly-available.md index 3354e2e3897b7937d96a3f6d6e77e6a6331f441a..652f5638f522708ff928ba4293f39d33b9ffb9f9 100644 --- a/content/posts/making-yourself-overly-available.md +++ b/content/posts/making-yourself-overly-available.md @@ -1,6 +1,8 @@ --- draft: true +cover: ./cover.png --- + \*\* TODO Making yourself overly available \*\*\* References diff --git a/content/posts/privacy-respecting-analytics.md b/content/posts/privacy-respecting-analytics.md index e4e986e91167581758487413f036faf1d60c0a52..fd43e25e4d255dfa60f9946a2a69726e63d3ab4a 100644 --- a/content/posts/privacy-respecting-analytics.md +++ b/content/posts/privacy-respecting-analytics.md @@ -1,6 +1,7 @@ --- title: "Privacy-respecting analytics" date: 2023-03-06T12:23:00-05:00 +cover: ./cover.png categories: ["Technology"] tags: ["Privacy", "Web"] draft: false diff --git a/content/posts/pull-vs-push-intentional-feeds.md b/content/posts/pull-vs-push-intentional-feeds.md index 43807be580adce482d40becada9026cb74bf360a..0ae2cb8d73e296766df0159ecb76b8b538464166 100644 --- a/content/posts/pull-vs-push-intentional-feeds.md +++ b/content/posts/pull-vs-push-intentional-feeds.md @@ -2,6 +2,7 @@ title: "Pull vs push: intentional feeds" date: 2023-03-18T00:43:55-04:00 draft: true +cover: ./cover.png --- When bored, my peers tend to open their preferred social media app and diff --git a/content/posts/pull-vs-push-intentional-notifications.md b/content/posts/pull-vs-push-intentional-notifications.md index ece2fe33c0de16f0cfd8c5e732dc9478ec0e0379..06e31402ac7cad0a80ae3990cfab450df75bfefc 100644 --- a/content/posts/pull-vs-push-intentional-notifications.md +++ b/content/posts/pull-vs-push-intentional-notifications.md @@ -1,6 +1,7 @@ --- title: "Pull vs push: intentional notifications" date: 2023-03-20T12:15:00-04:00 +cover: ./cover.png draft: false toc: true categories: ["Technology"] diff --git a/content/posts/stop-using-gmail.md b/content/posts/stop-using-gmail.md index d8ca6979ecee1bfc7507fd545704d1068e304d38..0e9b00f1e7037c0873c4bd6f1048d0e36588bf85 100644 --- a/content/posts/stop-using-gmail.md +++ b/content/posts/stop-using-gmail.md @@ -1,5 +1,6 @@ --- title: "Stop using gmail" date: 2023-01-27T13:04:33-05:00 +cover: ./cover.png draft: true --- diff --git a/content/posts/the-new-paper.md b/content/posts/the-new-paper.md index f1e3d70e592c6dceccb5b0f09ea15a497faa00c5..f8ac701aae3cd4e456b33aef347759f970eb7fd0 100644 --- a/content/posts/the-new-paper.md +++ b/content/posts/the-new-paper.md @@ -1,6 +1,7 @@ --- title: 'Catchy title about Supernote being "the new paper"' author: ["Amolith"] +cover: ./cover.png lastmod: 2023-01-27T13:00:37-05:00 tags: ["Supernote", "Writing", "Productivity", "Organisation"] categories: ["Technology"] diff --git a/content/projects.md b/content/projects.md index ed98e8e081334f601c93f33ac582a784a9b44666..8c51a87cebd28051447ddf35de5404a467433a59 100644 --- a/content/projects.md +++ b/content/projects.md @@ -2,6 +2,7 @@ title: "Projects" description: "Projects I'm currently working or have (mostly) finished" date: 2023-01-17T13:42:01-05:00 +cover: ./cover.png type: generic --- diff --git a/content/uses.md b/content/uses.md index 745a44d17326e08fa1c269af3c1d348dc98f1052..de008012e0be41ea614089727bf5ffc197b2fe1e 100644 --- a/content/uses.md +++ b/content/uses.md @@ -2,6 +2,7 @@ title: "Uses" description: "Just a big page describing what I use that I think is notable" date: 2021-08-18T22:57:48-04:00 +cover: ./cover.png type: generic --- diff --git a/justfile b/justfile index 18680be4541ae28e372495af79b0e2b95f0ef1f0..fb5dfd3b00c26150fd00ba3e2d59caf6c2a621b6 100644 --- a/justfile +++ b/justfile @@ -66,9 +66,36 @@ images: echo -e '\033[1m# Checking whether there are cover images to generate ...\033[0m' - echo -e '\033[1m# \033[4mTODO\033[0m\033[1m: Generate covers for posts that have changed or that have no cover\033[0m' - # wkhtmltoimage -f png --width 1200 --height 630 /tmp/file.html /tmp/file.png - # optipng -o4 file.png + published=$(grep -ilr --include \*.md "draft: false" content/posts) + + todo="" + + # Iterate through all non-drafts + for path in $published + do + filename=$(basename "$path") + name=$(echo "${filename%.*}") + # Check whether target doc is newer than Markdown file + if [ "$path" -nt "public/$name/cover.png" ] + then + todo+="$path " + fi + done + + if [ -z "$todo" ] + then + echo "No covers to generate" + exit 0 + else + for path in $todo + do + filename=$(basename "$path") + name=$(echo "${filename%.*}") + echo "Generating cover for $name" + + p2c -i $path -o public/$name/cover.png + done + fi # Run development server serve: