Browse Source

various small stylistic edits

master
Amolith 4 months ago
parent
commit
fe8b3601f1
Signed by: Amolith GPG Key ID: 5548AD9930655715
  1. 58
      content/posts/100-days-to-offload.md
  2. 97
      content/posts/100-days-to-read.md
  3. 73
      content/posts/a-mostly-google-free-android.md
  4. 51
      content/posts/adding-a-better-scroll-to-top-button-without-javascript.md
  5. 48
      content/posts/arch-spin-pt-1.md
  6. 12
      content/posts/arch-spin-pt-2.md
  7. 30
      content/posts/arch-spin-pt-3.md
  8. 62
      content/posts/bluegrass-music.md
  9. 101
      content/posts/calcurse-notifications.md
  10. 58
      content/posts/consuming-news.md
  11. 183
      content/posts/custom-streaming-setup.md
  12. 23
      content/posts/day-3.md
  13. 80
      content/posts/day-6-updates.md
  14. 178
      content/posts/documenting-with-mediawiki.md
  15. 39
      content/posts/downloading-courses-from-linux-academy.md
  16. 67
      content/posts/excluding-your-site-from-the-wayback-machine-keybase-only.md
  17. 41
      content/posts/lossless-screen-recording.md
  18. 13
      content/posts/moving-my-old-blog.md
  19. 166
      content/posts/my-cellar.md
  20. 11
      content/posts/pausing-100-days-to-offload.md
  21. 17
      content/posts/pr-2.md
  22. 67
      content/posts/reading-methods-rsvp.md
  23. 84
      content/posts/removing-your-site-from-the-wayback-machine-gpg-only.md
  24. 76
      content/posts/replacing-youtube-invidious.md
  25. 20
      content/posts/running-an-irc-server.md
  26. 90
      content/posts/some-font-changes.md
  27. 4
      content/posts/ssos-1.md
  28. 2
      content/posts/ssos-2.md
  29. 7
      content/posts/ssos-3.md
  30. 57
      content/posts/stop-using-gmail.md
  31. 104
      content/posts/typing-international-characters.md
  32. 119
      content/posts/vim-as-a-markdown-editor.md
  33. 95
      content/posts/why-i-smoke-a-pipe.md

58
content/posts/100-days-to-offload.md

@ -8,18 +8,64 @@ tags:
- 100 Days To Offload
date: 2020-04-25T22:12:40-04:00
---
A friend of mine, [Kev Quirk](https://kevq.uk/), issued [a challenge](https://fosstodon.org/@kev/104053977554016690) yesterday and I decided to take him up on it. In the time between then and now, he's actually set up a website for participants to submit their posts; it's called (quite fittingly) *[100 Days To Offload](https://100daystooffload.com/)*. I'm going to attempt to keep up with it for the next 100 days and see where it takes me. Because I'll be using this blog every day, expect a lot of changes and improvements. With that out of the way, here goes!
A friend of mine, [Kev Quirk,](https://kevq.uk/) issued [a
challenge](https://fosstodon.org/@kev/104053977554016690) yesterday and
I decided to take him up on it. In the time between then and now, he's
actually set up a website for participants to submit their posts; it's
called (quite fittingly) *[100 Days To
Offload.](https://100daystooffload.com/)* I'm going to attempt to keep
up with it for the next 100 days and see where it takes me. Because I'll
be using this blog every day, expect a lot of changes and improvements.
With that out of the way, here goes!
---
Part of this challenge is "offloading" and one of the ways that word can be meant is to lay out everything that's on your mind. Today, that's school. I'm generally an *incredibly* laid-back person; I don't really ever get stressed about anything. That is simultaneously a good thing and a very bad thing. Because I don't really get stressed, I don't feel the urgency of getting homework done, communicating with professors about late assignments, studying, the works. In the past, I've enjoyed the content I was learning so the fear of making a bad grade was never a motivator---it was interest in the subject and a natural curiosity. Right now, I'm not interested in any of my subjects except for German. It's very unlikely that I will be dealing with Java in the workforce, Discrete Math is boring, and Calculus II is *killing* me[^1]. I don't even know if I'll pass it this semester.
Part of this challenge is "offloading" and one of the ways that word can
be meant is to lay out everything that's on your mind. Today, that's
school. I'm generally an *incredibly* laid-back person; I don't really
ever get stressed about anything. That is simultaneously a good thing
and a very bad thing. Because I don't really get stressed, I don't feel
the urgency of getting homework done, communicating with professors
about late assignments, studying, the works. In the past, I've enjoyed
the content I was learning so the fear of making a bad grade was never a
motivator---it was interest in the subject and a natural curiosity.
Right now, I'm not interested in any of my subjects except for German.
It's very unlikely that I will be dealing with Java in the workforce,
Discrete Math is boring, and Calculus II is *killing* me.[^1] I don't
even know if I'll pass it this semester.
And yet...I'm still not stressed. My university implemented an optional pass-fail grading system in light of the pandemic and the physical campus shutting down. If a student is making an A, they will definitely opt out. If a student is making a C, the minimum required to move on, they will opt in. This mean the C will remain on their transcript *but* it won't affect their GPA. For those wanting to get into grad school (me), it is a god send. I have been so lax this semester about doing *anything* for my classes that I will very likely end up opting in for all of courses except German. As I said above, I don't even know if I'll make a C in Calculus though that isn't just because I haven't done all of the work; I have one of the most difficult professors in the math department.I am worried but I'm *very* good at keeping that in the back of my mind under many many layers of keeping myself busy. It's a bit like that meme of the dog saying "this is fine" while the house burns around him except I'm not looking at the fire. My head is craned towards my monitor, my fingers on the keyboard, and my mind is somewhere in a server in Germany ignoring every bit of it.
And yet...I'm still not stressed. My university implemented an optional
pass-fail grading system in light of the pandemic and the physical
campus shutting down. If a student is making an A, they will definitely
opt out. If a student is making a C, the minimum required to move on,
they will opt in. This mean the C will remain on their transcript *but*
it won't affect their GPA. For those wanting to get into grad school
(me), it is a god send. I have been so lax this semester about doing
*anything* for my classes that I will very likely end up opting in for
all of courses except German. As I said above, I don't even know if I'll
make a C in Calculus though that isn't just because I haven't done all
of the work; I have one of the most difficult professors in the math
department.I am worried but I'm *very* good at keeping that in the back
of my mind under many many layers of keeping myself busy. It's a bit
like that meme of the dog saying "this is fine" while the house burns
around him except I'm not looking at the fire. My head is craned towards
my monitor, my fingers on the keyboard, and my mind is somewhere in a
server in Germany ignoring every bit of it.
This is very much a badly-written ramble and I'm not even going to read through it before posting. I don't like talking about this kind of thing but it feels good to get it off my chest, even if it is garbled and likely hard to read. I will try to only have a single "downer" post like this in the series; I have a few ideas for much better content.
This is very much a badly-written ramble and I'm not even going to read
through it before posting. I don't like talking about this kind of thing
but it feels good to get it off my chest, even if it is garbled and
likely hard to read. I will try to only have a single "downer" post like
this in the series; I have a few ideas for much better content.
---
This is published as part of *100 Days To Offload* and is not indicative of the rest of the content there; most of it is much more positive ๐Ÿ˜… To join in, simply write a post, submit it [here](https://100daystooffload.com/), and use `#100DaysToOffload` somewhere on your social media ๐Ÿ˜‰
This is published as part of *100 Days To Offload* and is not indicative
of the rest of the content there; most of it is much more positive ๐Ÿ˜… To
join in, simply write a post, submit it
[here,](https://100daystooffload.com/) and use `#100DaysToOffload`
somewhere on your social media ๐Ÿ˜‰
[^1]: I actually took the course last semester and ended up dropping it because my grade was so bad right out of the gate.
[^1]: I actually took the course last semester and ended up dropping it
because my grade was so bad right out of the gate.

97
content/posts/100-days-to-read.md

@ -12,28 +12,103 @@ tags:
- 100 Days to Offload
---
## The idea
I've found it very difficult to stick to a regular schedule for [#100DaysToOffload](https://100daystooffload) for various reasons. Chief among them is simply that I don't have enough time with everything else I have going on; what I want to write and the ideas I've had take longer to get on paper (or screen) than I'm able to dedicate at the moment[^1]. However, I love the intent behind it and want to continue in a somewhat less involved manner. Enter [#100DaysToRead](https://social.nixnet.services/tags/100DaysToRead).
I've found it very difficult to stick to a regular schedule for
[#100DaysToOffload](https://100daystooffload) for various reasons. Chief
among them is simply that I don't have enough time with everything else
I have going on; what I want to write and the ideas I've had take longer
to get on paper (or screen) than I'm able to dedicate at the moment.[^1]
However, I love the intent behind it and want to continue in a somewhat
less involved manner. Enter
[#100DaysToRead.](https://social.nixnet.services/tags/100DaysToRead)
## The "rules"
Quotes are used because they're not solid rules; it can be hard to learn something significant from fiction, you might miss a day here and there, what you learned could be a bit personal and not really suitable for social media, any number of things might result in "breaking" one or all of them. Just do your best. ๐Ÿ™‚
Quotes are used because they're not solid rules; it can be hard to learn
something significant from fiction, you might miss a day here and there,
what you learned could be a bit personal and not really suitable for
social media, any number of things might result in "breaking" one or all
of them. Just do your best. ๐Ÿ™‚
### Read for an hour a day
I recommend using some kind of timer or stopwatch to track how long you've been reading. A stopwatch would be best as it allows you to get sucked in without ringing and making you feel as if you *need* to stop; the pull of real life is great and audible reminders only serve to exacerbate the urgency of rejoining the rest of the world. Part of the idea behind this is not only to learn something but to *enjoy* it and that's difficult when you're anxiously waiting for a timer to ding so you can get back to watching a show. I spent a *lot* of time with books when I was younger then fell completely out of the practise once I got more involved with school and want to make it a habit once more.
I recommend using some kind of timer or stopwatch to track how long
you've been reading. A stopwatch would be best as it allows you to get
sucked in without ringing and making you feel as if you *need* to stop;
the pull of real life is great and audible reminders only serve to
exacerbate the urgency of rejoining the rest of the world. Part of the
idea behind this is not only to learn something but to *enjoy* it and
that's difficult when you're anxiously waiting for a timer to ding so
you can get back to watching a show. I spent a *lot* of time with books
when I was younger then fell completely out of the practise once I got
more involved with school and want to make it a habit once more.
### Take notes
The *main* goal of this challenge is to learn things and the effects of this rule are twofold; you'll certainly be learning a lot but it will also provide material to write about in the future[^2]. Take notes in whatever manner you prefer, from writing in the margins[^3] to writing on the wall, though the latter might not be the greatest idea. I personally plan to put my notes in [a Zettelkasten](https://zettelkasten.de/) created with [vimwiki](https://github.com/vimwiki/vimwiki/) along with the rest of my notes[^4]. I will first write down whatever thoughts I have in my [pocket notebook](https://www.walmart.com/ip/Moleskine-Classic-Notebook-Hard-Cover-Pocket-3-5-x-5-5-Plain-Blank-Black-192-Pages-9788883701030-Hardcover-Ntb/8402217) (these will likely just be a short summary with the page/paragraph as reference[^5]) then, directly after I've finished the session or later that dayโ€”the same day!โ€”I'll go through the notes and expand them a bit. I want the *full* thought stored in my Zettelkasten for use in the future; whenever I read another book and have a related thought, I'll return to this note and add links between them.
The *main* goal of this challenge is to learn things and the effects of
this rule are twofold; you'll certainly be learning a lot but it will
also provide material to write about in the future.[^2] Take notes in
whatever manner you prefer, from writing in the margins[^3] to writing
on the wall, though the latter might not be the greatest idea. I
personally plan to put my notes in [a
Zettelkasten](https://zettelkasten.de/) created with
[vimwiki](https://github.com/vimwiki/vimwiki/) along with the rest of my
notes.[^4] I will first write down whatever thoughts I have in my
[pocket
notebook](https://www.walmart.com/ip/Moleskine-Classic-Notebook-Hard-Cover-Pocket-3-5-x-5-5-Plain-Blank-Black-192-Pages-9788883701030-Hardcover-Ntb/8402217)
(these will likely just be a short summary with the page/paragraph as
reference[^5]) then, directly after I've finished the session or later
that dayโ€”the same day!โ€”I'll go through the notes and expand them a bit.
I want the *full* thought stored in my Zettelkasten for use in the
future; whenever I read another book and have a related thought, I'll
return to this note and add links between them.
### Post a short summary
Whatever you've learned that day, post a condensed version along with the book/page/paragraph on social media using the [#100DaysToRead](https://social.nixnet.services/tags/100DaysToRead) tag! Expanding a short summary then condensing it again with different wording helps to ensure you understand the material and will aid in recollection. Posting about it will give others the same information and might even pique their interest about what you're reading.
Whatever you've learned that day, post a condensed version along with
the book/page/paragraph on social media using the
[#100DaysToRead](https://social.nixnet.services/tags/100DaysToRead) tag!
Expanding a short summary then condensing it again with different
wording helps to ensure you understand the material and will aid in
recollection. Posting about it will give others the same information and
might even pique their interest about what you're reading.
## Thoughts
Inspiration for this comes partly from [episode 112](https://www.social-engineer.org/podcast/ep-112-catching-spies-and-paying-parking-tickets-with-joe-navarro/) of [The Social-Engineer Podcast](https://www.social-engineer.org/podcast/), partly from me wanting to learn more, and partly from me wanting more material to write about. There is so much knowledge in books but it takes a great deal of discipline to sit down every day and read for an hour when there are upgrades to perform, emails waiting for replies, games to play, shows to watch, and so much else. Another small aspect of this is partly to alleviate those concerns and stresses; it's a time to sit down, lose yourself in a book, and forget about the outside world.
Inspiration for this comes partly from [episode
112](https://www.social-engineer.org/podcast/ep-112-catching-spies-and-paying-parking-tickets-with-joe-navarro/)
of [The Social-Engineer
Podcast,](https://www.social-engineer.org/podcast/) partly from me
wanting to learn more, and partly from me wanting more material to write
about. There is so much knowledge in books but it takes a great deal of
discipline to sit down every day and read for an hour when there are
upgrades to perform, emails waiting for replies, games to play, shows to
watch, and so much else. Another small aspect of this is partly to
alleviate those concerns and stresses; it's a time to sit down, lose
yourself in a book, and forget about the outside world.
## What I'm starting with
Fittingly, I plan to begin with *[How to Read a Book](https://wikipedia.org/wiki/How_to_Read_a_Book)* by [Mortimer J. Adler](https://wikipedia.org/wiki/Mortimer_J._Adler). It provides an in-depth discussion on reading critically and learning as much as possible from a given book. Adler doesn't push a "one-strategy-fits-all" method either. He goes through a variety of approaches for different genres and encourages a deep level of thinking for all, fiction included. I'm looking forward to starting it tomorrow!
Fittingly, I plan to begin with *[How to Read a
Book](https://wikipedia.org/wiki/How_to_Read_a_Book)* by [Mortimer J.
Adler.](https://wikipedia.org/wiki/Mortimer_J._Adler) It provides an
in-depth discussion on reading critically and learning as much as
possible from a given book. Adler doesn't push a "one-strategy-fits-all"
method either. He goes through a variety of approaches for different
genres and encourages a deep level of thinking for all, fiction
included. I'm looking forward to starting it tomorrow!
[^1]: With finding links, proofreading, revising, expanding, and
shortening various sections, this short post took me over two hours
to write.
[^1]: With finding links, proofreading, revising, expanding, and shortening various sections, this short post took me over two hours to write.
[^2]: Maybe a #100DaysToOffload Take 2!
[^3]: I physically can't bring myself to do this but some people love [marginalia](https://wikipedia.org/wiki/Marginalia) and actively seek books with them. However, it's a very effective technique and might be fun to follow your thought trail when re-reading a book.
[^4]: I am currently evaluating [Anytype](https://anytype.io/) as a tool for creating and maintaining a Zettelkasten as well as storing other types on information. At the moment, I can only use it on Windows so it's inaccessible when I *really* need it but the developers say a Linux build will be ready soonโ„ข
[^5]: I plan to format these like `p20 ยถ2`. The second symbol is a *pilcrow* or, more commonly, a paragraph mark. Usage of that and the section mark (ยง) are detailed in Matthew Butterick's *[Practical Typography](https://practicaltypography.com/paragraph-and-section-marks.html)*.
[^3]: I physically can't bring myself to do this but some people love
[marginalia](https://wikipedia.org/wiki/Marginalia) and actively
seek books with them. However, it's a very effective technique and
might be fun to follow your thought trail when re-reading a book.
[^4]: I am currently evaluating [Anytype](https://anytype.io/) as a tool
for creating and maintaining a Zettelkasten as well as storing other
types on information. At the moment, I can only use it on Windows so
it's inaccessible when I *really* need it but the developers say a
Linux build will be ready soonโ„ข
[^5]: I plan to format these like `p20 ยถ2`. The second symbol is a
*pilcrow* or, more commonly, a paragraph mark. Usage of that and the
section mark (ยง) are detailed in Matthew Butterick's *[Practical
Typography.](https://practicaltypography.com/paragraph-and-section-marks.html)*

73
content/posts/a-mostly-google-free-android.md

@ -13,30 +13,85 @@ tags:
- Mobile
- 100 Days To Offload
---
Let me put a little disclaimer right here at the beginning: I don't use my mobile phone how a lot of people do so your mileage will vary. I also say "Mostly" in the title because it's incredibly difficult to *completely* remove Google from Android though [some projects](https://www.replicant.us/) have done a very good job of it.
Let me put a little disclaimer right here at the beginning: I don't use
my mobile phone how a lot of people do so your mileage will vary. I also
say "Mostly" in the title because it's incredibly difficult to
*completely* remove Google from Android though [some
projects](https://www.replicant.us/) have done a very good job of it.
## My motivation
In short, I value my privacy and Google is about as far from privacy-friendly as you can get. What information algorithms are capable of extrapolating given enough data is downright *scary* and **[that is Google's entire business model](https://www.eff.org/deeplinks/2020/03/google-says-it-doesnt-sell-your-data-heres-how-company-shares-monetizes-and)**. In addition, the company itself is [really quite terrible](https://www.alphabetworkers.org/resignation-letter/), from [launching a censored search engine in China](https://theintercept.com/2018/08/01/google-china-search-engine-censorship/) and [selling AI tech to the US military](https://gizmodo.com/google-employees-resign-in-protest-against-pentagon-con-1825729300) to [mishandling sexual assault cases](https://gizmodo.com/massive-google-walkout-over-sexual-misconduct-marks-tec-1830157276) and [forcing people onto Google services with sheer market dominance](https://www.cnbc.com/2018/07/10/eu-hits-alphabet-google-with-android-antitrust-fine.html).
In short, I value my privacy and Google is about as far from
privacy-friendly as you can get. What information algorithms are capable
of extrapolating given enough data is downright *scary* and **[that is
Google's entire business
model.](https://www.eff.org/deeplinks/2020/03/google-says-it-doesnt-sell-your-data-heres-how-company-shares-monetizes-and)**
In addition, the company itself is [really quite
terrible,](https://www.alphabetworkers.org/resignation-letter/) from
[launching a censored search engine in
China](https://theintercept.com/2018/08/01/google-china-search-engine-censorship/)
and [selling AI tech to the US
military](https://gizmodo.com/google-employees-resign-in-protest-against-pentagon-con-1825729300)
to [mishandling sexual assault
cases](https://gizmodo.com/massive-google-walkout-over-sexual-misconduct-marks-tec-1830157276)
and [forcing people onto Google services with sheer market
dominance.](https://www.cnbc.com/2018/07/10/eu-hits-alphabet-google-with-android-antitrust-fine.html)
I do not like Google and I do not want it on my phone.
## What I'm using
I have the [Redmi Note 5 Pro](https://www.mi.com/in/redmi-note-5-pro/) and love it. Specifically, one of the things I like is Xiaomi's business model. It's exactly the same as Google'sโ€”data collection and advertisingโ€”but it's incredibly easy to circumvent. Xiaomi not only uses its [MIUI](https://en.miui.com/) (*me-you-eye*) for user tracking and profiling but it also displays ads on the lock screen and elsewhere. Because of all that, they're able to *seriously* drop the price on their phones and almost sell them at no more than the hardware and manufacturing cost.
I have the [Redmi Note 5 Pro](https://www.mi.com/in/redmi-note-5-pro/)
and love it. Specifically, one of the things I like is Xiaomi's business
model. It's exactly the same as Google'sโ€”data collection and
advertisingโ€”but it's incredibly easy to circumvent. Xiaomi not only uses
its [MIUI](https://en.miui.com/) (*me-you-eye*) for user tracking and
profiling but it also displays ads on the lock screen and elsewhere.
Because of all that, they're able to *seriously* drop the price on their
phones and almost sell them at no more than the hardware and
manufacturing cost.
Circumventing the data collection is as easy as flashing your own ROM; I prefer [AospExtended](https://aospextended.com/) though [LineageOS](https://lineageos.org/) is a much simpler and "cleaner" Android experience. Many of the installation guide will tell you to flash some [Open GApps](https://opengapps.org/) package but I don't. Others will say to use [microG](https://microg.org/), which is much better but I decided to even omit that the last time I flashed my phone. Thus, I have absolutely no compatibility with Google Services and apps that break without it, well, break.
Circumventing the data collection is as easy as flashing your own ROM; I
prefer [AospExtended](https://aospextended.com/) though
[LineageOS](https://lineageos.org/) is a much simpler and "cleaner"
Android experience. Many of the installation guide will tell you to
flash some [Open GApps](https://opengapps.org/) package but I don't.
Others will say to use [microG,](https://microg.org/) which is much
better but I decided to even omit that the last time I flashed my phone.
Thus, I have absolutely no compatibility with Google Services and apps
that break without it, well, break.
I also have the [Mi Band 4](https://www.mi.com/global/mi-smart-band-4)
which does give Xiaomi the ability to collect a plethora of biometric
data as well โ€ฆ if I use their app. Instead, I like
[Gadgetbridge](https://codeberg.org/Freeyourgadget/Gadgetbridge/) from
[F-Droid](https://f-droid.org/en/packages/nodomain.freeyourgadget.gadgetbridge/).
[F-Droid.](https://f-droid.org/en/packages/nodomain.freeyourgadget.gadgetbridge/)
I do occasionally want proprietary apps such as
[Linguee](https://www.linguee.com/) for English/German translation and I get those through [Aurora](https://auroraoss.com/) rather than Google Play.
[Linguee](https://www.linguee.com/) for English/German translation and I
get those through [Aurora](https://auroraoss.com/) rather than Google
Play.
## What it's like
I mentioned that some apps will break without Google Services, however, I find that they are solidly in the minority; most proprietary applications will work perfectly fine without Google Services or microG though you won't get push notifications. That's really not a big deal for me because I've been moving to a more minimal mobile experience and do most things on my desktop anyway. This is closely related to the disclaimer at the top. I rarely use my phone for anything other than communication through open source apps and listening to podcasts; I don't even have an email client installed (but if I did, it would be [K-9 Mail](https://k9mail.app/)). In all, it's perfectly useable but don't expect your banking application to work[^1].
I mentioned that some apps will break without Google Services, however,
I find that they are solidly in the minority; most proprietary
applications will work perfectly fine without Google Services or microG
though you won't get push notifications. That's really not a big deal
for me because I've been moving to a more minimal mobile experience and
do most things on my desktop anyway. This is closely related to the
disclaimer at the top. I rarely use my phone for anything other than
communication through open source apps and listening to podcasts; I
don't even have an email client installed (but if I did, it would be
[K-9 Mail.](https://k9mail.app/)) In all, it's perfectly useable but
don't expect your banking application to work.[^1]
---
This was posted as part of [#100DaysToOffload](https://100daystooffload.com/), an [awesome idea](https://fosstodon.org/@kev/104053977554016690) from [Kev Quirk](https://kevq.uk/). If you want to participate, just write something every day for 100 days and post a link on social media with the hashtag!
[^1]: Why would you bank on mobile anyway? Mobile platforms are some of the most insecure and something that sensitive should be kept far away.
This was posted as part of
[#100DaysToOffload,](https://100daystooffload.com/) an [awesome
idea](https://fosstodon.org/@kev/104053977554016690) from [Kev
Quirk](https://kevq.uk/). If you want to participate, just write
something every day for 100 days and post a link on social media with
the hashtag!
[^1]: Why would you bank on mobile anyway? Mobile platforms are some of
the most insecure and something that sensitive should be kept far
away.

51
content/posts/adding-a-better-scroll-to-top-button-without-javascript.md

@ -12,25 +12,44 @@ tags:
- Websites
toc: true
---
I'm a fan of using as little JavaScript as feasible on a website and implementing a scroll-to-top button in JS is just ridiculous. Nevertheless, there seems to be a plethora of copypasta for it so I thought I would write about implementing one in pure HTML and CSS. The title is just a playful poke at [Kev Quirk](https://kevq.uk) who recently posted about [exactly the same thing](https://kevq.uk/adding-a-scroll-to-top-button-without-javascript/) but with different styling ๐Ÿ˜‰
I'm a fan of using as little JavaScript as feasible on a website and
implementing a scroll-to-top button in JS is just ridiculous.
Nevertheless, there seems to be a plethora of copypasta for it so I
thought I would write about implementing one in pure HTML and CSS. The
title is just a playful poke at [Kev Quirk](https://kevq.uk) who
recently posted about [exactly the same
thing](https://kevq.uk/adding-a-scroll-to-top-button-without-javascript/)
but with different styling ๐Ÿ˜‰
## HTML
There's only one attribute to add to an existing HTML tag near the top of your page and a single line for the button itself.
There's only one attribute to add to an existing HTML tag near the top
of your page and a single line for the button itself.
For the attribute, you'll need to use an
[ID.](https://www.w3schools.com/hTML/html_id.asp) When the button is
clicked, the user will be taken to whatever element has this attribute.
For my site, I simply added it to the header at the very top.
For the attribute, you'll need to use an [ID](https://www.w3schools.com/hTML/html_id.asp). When the button is clicked, the user will be taken to whatever element has this attribute. For my site, I simply added it to the header at the very top.
```html
``` html
<header class="header" id="top">
```
All that's required for the button is:
```html
``` html
<a href="#top"><button class="top">Top</button></a>
```
## CSS
The basic HTML above is exactly the same as what Kev's article has. The CSS is where ours will diverge. Having a button at the very bottom of the page is perfectly fine but I use my site as more than a blog; it's reasonable to expect visitors to simply search for a link or whatever else and move on. Having a floating button that stays in the same place as the user scrolls is a good way to facilitate this.
The basic HTML above is exactly the same as what Kev's article has. The
CSS is where ours will diverge. Having a button at the very bottom of
the page is perfectly fine but I use my site as more than a blog; it's
reasonable to expect visitors to simply search for a link or whatever
else and move on. Having a floating button that stays in the same place
as the user scrolls is a good way to facilitate this.
```css
``` css
.top {
position: fixed;
bottom: 10px;
@ -50,7 +69,21 @@ The basic HTML above is exactly the same as what Kev's article has. The CSS is w
}
```
The `position`, `bottom`, and `right` lines are what tell your browser to render the item in the bottom right. The position is `fixed` so that means we can put it wherever on the page we want and it will stay there as the user scrolls. `right` and `bottom` say that the element is to be positioned 10 pixels above the bottom of the page and 10 pixels from the right. It's rather hidden on desktop but I'm not expecting desktop users to click it very often; that's what the `Home` key is for, after all, and it works across every website. I'm expecting mobile users to make use of it the most.
The `position`, `bottom`, and `right` lines are what tell your browser
to render the item in the bottom right. The position is `fixed` so that
means we can put it wherever on the page we want and it will stay there
as the user scrolls. `right` and `bottom` say that the element is to be
positioned 10 pixels above the bottom of the page and 10 pixels from the
right. It's rather hidden on desktop but I'm not expecting desktop users
to click it very often; that's what the `Home` key is for, after all,
and it works across every website. I'm expecting mobile users to make
use of it the most.
---
This was posted as part of [#100DaysToOffload](https://100daystooffload.com/), an [awesome idea](https://fosstodon.org/@kev/104053977554016690) from [Kev Quirk](https://kevq.uk/). If you want to participate, just write something every day for 100 days and post a link on social media with the hashtag!
This was posted as part of
[#100DaysToOffload](https://100daystooffload.com/), an [awesome
idea](https://fosstodon.org/@kev/104053977554016690) from [Kev
Quirk](https://kevq.uk/). If you want to participate, just write
something every day for 100 days and post a link on social media with
the hashtag!

48
content/posts/arch-spin-pt-1.md

@ -10,13 +10,49 @@ tags:
- Arch Linux
- Arch Spin
---
Today I had an orthodontist appointment and a voice lesson. The appointment was at 15:00 and the voice lesson at 16:00. I got to the orthodontist's office 10 minutes early, was told to right to the back (like always), I sat down in the seat, and the orthodontist came over after a few minutes with another patient. He looked at my teeth, had me put my retainers in, checked how they fit, then said I don't ever need to come back (unless I do need to). That all took about 7 or 8 minutes. My voice lesson was ~5 minutes away so I had an hour to kill. I drove to the college (where the lesson was), went into the computer lab, and booted my [multibootable](http://multibootusb.org/) bootable.
I went through the distros I had and chose the [i3 spin of Manjaro](https://manjaro.org/category/community-editions/i3/), forgetting that it hadn't written correctly and was corrupt. I went through a couple of other distros that were as well and settled on [Parrot Home](https://www.parrotsec.org/download-home.php). While I love Parrot Home for security reasons, it wasn't what I was looking for. I started trying to think of a distro that fit all my daily needs that I could take on a flash drive with me wherever I went and . . . I couldn't.
Today I had an orthodontist appointment and a voice lesson. The
appointment was at 15:00 and the voice lesson at 16:00. I got to the
orthodontist's office 10 minutes early, was told to right to the back
(like always), I sat down in the seat, and the orthodontist came over
after a few minutes with another patient. He looked at my teeth, had me
put my retainers in, checked how they fit, then said I don't ever need
to come back (unless I do need to). That all took about 7 or 8 minutes.
My voice lesson was ~5 minutes away so I had an hour to kill. I drove to
the college (where the lesson was), went into the computer lab, and
booted my [multibootable](http://multibootusb.org/) bootable.
I would boot it, try to install some app I'm missing (Telegram, for instance), find that I need to first update everything then upgrade some packages then have no space left to install Telegram. There isn't one distro I can think of that I wouldn't have to do that with. So I thought I'd try my hand at installing Arch on a flash drive.
I went through the distros I had and chose the [i3 spin of
Manjaro,](https://manjaro.org/category/community-editions/i3/)
forgetting that it hadn't written correctly and was corrupt. I went
through a couple of other distros that were as well and settled on
[Parrot Home.](https://www.parrotsec.org/download-home.php) While I love
Parrot Home for security reasons, it wasn't what I was looking for. I
started trying to think of a distro that fit all my daily needs that I
could take on a flash drive with me wherever I went and . . . I
couldn't.
As I was reading, I decided I would rather make a *live* system. This way, I can log into whatever I need to and, as soon as I turn it off, whatever I did disappears. I asked around in the Arch [Telegram channel](https://t.me/archlinuxgroup) and was given a few pages to read up on the wiki as well as a youtube video. First is [building the arch iso](https://wiki.archlinux.org/index.php/archiso), [making a custom repo](https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Custom_local_repository) for installing AUR packages, building them in a [chroot](https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot) so you don't mess with your current setup, and the [YouTube videos](https://www.youtube.com/watch?v=DqV1BJtJXEA) that help tie it all together:
I would boot it, try to install some app I'm missing (Telegram, for
instance), find that I need to first update everything then upgrade some
packages then have no space left to install Telegram. There isn't one
distro I can think of that I wouldn't have to do that with. So I thought
I'd try my hand at installing Arch on a flash drive.
# Summary
That'll be it for this post. It was originally a lot longer but I think I want to keep them to a quick read so it's easier to pick up where you left off. I'm not sure what the next post will contain but I am sure that it talks about setting up your dev environment ๐Ÿ˜‰
As I was reading, I decided I would rather make a *live* system. This
way, I can log into whatever I need to and, as soon as I turn it off,
whatever I did disappears. I asked around in the Arch [Telegram
channel](https://t.me/archlinuxgroup) and was given a few pages to read
up on the wiki as well as a youtube video. First is [building the arch
iso,](https://wiki.archlinux.org/index.php/archiso) [making a custom
repo](https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Custom_local_repository)
for installing AUR packages, building them in a
[chroot](https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot)
so you don't mess with your current setup, and the [YouTube
videos](https://www.youtube.com/watch?v=DqV1BJtJXEA) that help tie it
all together:
## Summary
That'll be it for this post. It was originally a lot longer but I think
I want to keep them to a quick read so it's easier to pick up where you
left off. I'm not sure what the next post will contain but I am sure
that it talks about setting up your dev environment ๐Ÿ˜‰

12
content/posts/arch-spin-pt-2.md

@ -10,10 +10,16 @@ Tags:
- Arch Linux
- Arch Spin
---
*I **think** I'm going to call it a spin . . .*
* Install the package `archiso` from the official repos or `archiso-git` from the AUR
* Install the package `archiso` from the official repos or `archiso-git`
from the AUR
* `$ mkdir ~/<build-directory>`
* Replace `<build-directory>` with wherever you want the iso build to be stored. This is where we'll be spending all of our time configuring. Mine is at `~/liveiso/` and that's the path I'll be using in this and future posts
* Replace `<build-directory>` with wherever you want the iso build
to be stored. This is where we'll be spending all of our time
configuring. Mine is at `~/liveiso/` and that's the path I'll be
using in this and future posts
* `$ sudo cp -r /usr/share/archiso/configs/releng/ ~/liveiso`
* Edit `~/liveiso/packages.x86_64` to install desired software
* This will be addressed in the next post, `packages.x86_64`, where I also give some quick ways to install everything you might want.
* This will be addressed in the next post, `packages.x86_64`, where
I also give some quick ways to install everything you might want.

30
content/posts/arch-spin-pt-3.md

@ -9,11 +9,33 @@ tags:
- Arch Linux
- Arch Spin
---
# Package configuration
As I said in the last post, this is the file in which you list the applications you wish to install. I won't list the defaults because there a lot. *However*, this basic setup only builds to a total of ~440 MB so you can add *many* more applications.
I want the setup on this bootable to be exactly the same as what I currently have on my system. I did not want to manually enter every single package though. Thankfully, pacman is a feature-complete tool and it lets you get a *lot* of information about installed packages. `pacman -Qne` lists all the currently installed packages that you explicitly installed. It does not list dependencies of those applications. What I did was run `pacman -Qne >> ~/liveiso/packages.x86_64` to add all the apps I have installed from the official Arch repos to the end of the file so nothing was overwritten.
## Package configuration
As I said in the last post, this is the file in which you list the
applications you wish to install. I won't list the defaults because
there a lot. *However*, this basic setup only builds to a total of ~440
MB so you can add *many* more applications.
After, I ran `pacman -Qni >> official.txt` so I could get information about all those packages and decide whether or not I wanted to keep them. For example, I removed some stuff from deepin that I no longer used, SuperTuxKart, and a lot of other stuff. This shrunk my iso from 3.6 GB to 2.5. Now I have a lot of space to use for installing my applications from the AUR. This includes [making a custom repo](https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Custom_local_repository) for the packages and [building them in a chroot](https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot) so you make *sure* you have all the needed dependencies while keeping your system from being messed up while building.
I want the setup on this bootable to be exactly the same as what I
currently have on my system. I did not want to manually enter every
single package though. Thankfully, pacman is a feature-complete tool and
it lets you get a *lot* of information about installed packages. `pacman
-Qne` lists all the currently installed packages that you explicitly
installed. It does not list dependencies of those applications. What I
did was run `pacman -Qne >> ~/liveiso/packages.x86_64` to add all the
apps I have installed from the official Arch repos to the end of the
file so nothing was overwritten.
After, I ran `pacman -Qni >> official.txt` so I could get information
about all those packages and decide whether or not I wanted to keep
them. For example, I removed some stuff from deepin that I no longer
used, SuperTuxKart, and a lot of other stuff. This shrunk my iso from
3.6 GB to 2.5. Now I have a lot of space to use for installing my
applications from the AUR. This includes [making a custom
repo](https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Custom_local_repository)
for the packages and [building them in a
chroot](https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot)
so you make *sure* you have all the needed dependencies while keeping
your system from being messed up while building.
All of this will be discussed in the next blog post (when I get to it).

62
content/posts/bluegrass-music.md

@ -11,14 +11,66 @@ tags:
- 100 Days To Offload
date: 2020-04-28T02:13:16-04:00
---
When I was younger, I prided myself on being a classical musician. I played piano and organ, I was in a nearby fine arts university's choir (singing soprano of course), and, quite honestly, I was rather stuck up about it. I didn't know any bluegrass musicians so I had never really interacted with them or gotten "into" the genre but, whenever my mother would show me a group of people with a double bass, a banjo, a mandolin, and a fiddle, I would listen for a few seconds and write it off as "boring country". It wasn't until I started taking lessons that I grew fond of genre.
One of the things I had always wanted to play was double bass. However, lessons were *extremely* expensive and the instrument was even more so. Coming from a rather poor family of just me and my mother, classical lessons were completely out of the question. She did end up finding a way for me to take bluegrass lessons at an incredibly cheap rate; I won't say what the program is called because my name is plastered all over the internet for the branch in this area but it allows student to take lessons at a greatly reduced cost. Pricing was based on school lunch status and, with this particular branch, I was able to take free lessons and rent a bass for something like $30/semester. I picked it up quickly and started to really enjoy it, learning some classical pieces on the side and playing with a violin bow rather than the expensive bass bows. Throughout the lessons, my main goal was not to get "roped into" doing bluegrass for the rest of my life because I was entirely uninterested in that; I wanted to keep bluegrass in the back and classical in front.
When I was younger, I prided myself on being a classical musician. I
played piano and organ, I was in a nearby fine arts university's choir
(singing soprano of course), and, quite honestly, I was rather stuck up
about it. I didn't know any bluegrass musicians so I had never really
interacted with them or gotten "into" the genre but, whenever my mother
would show me a group of people with a double bass, a banjo, a mandolin,
and a fiddle, I would listen for a few seconds and write it off as
"boring country". It wasn't until I started taking lessons that I grew
fond of genre.
Because I picked it up so quickly, the style is very common in this area, and bass players in something of a shortage, I ended up playing for a number of different groups at different levels. In one of them, the youngest member was 12 and, in another, I was the youngest with the next being 30 years older. With all of these groups, I ended up meeting *many* amazing and wonderful people, playing *so much music*, and getting to travel quite a lot. It was very slow but, about three years after first picking up a bass, I'm actively seeking out more bluegrass to learn, recently picking up fingerstyle guitar, banjo, and maybe mandolin in the future.
One of the things I had always wanted to play was double bass. However,
lessons were *extremely* expensive and the instrument was even more so.
Coming from a rather poor family of just me and my mother, classical
lessons were completely out of the question. She did end up finding a
way for me to take bluegrass lessons at an incredibly cheap rate; I
won't say what the program is called because my name is plastered all
over the internet for the branch in this area but it allows student to
take lessons at a greatly reduced cost. Pricing was based on school
lunch status and, with this particular branch, I was able to take free
lessons and rent a bass for something like $30/semester. I picked it up
quickly and started to really enjoy it, learning some classical pieces
on the side and playing with a violin bow rather than the expensive bass
bows. Throughout the lessons, my main goal was not to get "roped into"
doing bluegrass for the rest of my life because I was entirely
uninterested in that; I wanted to keep bluegrass in the back and
classical in front.
In opening my mind to the genre, I also discovered a lot of beautiful music that's...not quite bluegrass but...not quite anything else I've heard either. I absolutely *love* the style and can't wait to meet up with a friend of mine and put some pieces together. The main band I've been following is [The Punch Brothers](https://www.punchbrothers.com/). [Chris Thile](https://wikipedia.org/wiki/Chris_Thile), the leader...holy shit he's a *musician*. From classical to bluegrass to jazz, he's an absolute madman. A couple of my favourite songs that The Punch Brothers do are written by him: *[My Oh My](https://invidio.us/watch?v=staHSMEE1pw)*, *[Julep]( https://invidio.us/watch?v=lLdtEiUKDig)*, *[Patchwork Girlfriend](https://invidio.us/watch?v=CMtyWB_Pzic)*, and *[Between 1st and A](https://invidio.us/watch?v=2hsXcl4X5vQ)*. The style is just so unique and different yet has those evident bluegrass roots underpinning it all.
Because I picked it up so quickly, the style is very common in this
area, and bass players in something of a shortage, I ended up playing
for a number of different groups at different levels. In one of them,
the youngest member was 12 and, in another, I was the youngest with the
next being 30 years older. With all of these groups, I ended up meeting
*many* amazing and wonderful people, playing *so much music*, and
getting to travel quite a lot. It was very slow but, about three years
after first picking up a bass, I'm actively seeking out more bluegrass
to learn, recently picking up fingerstyle guitar, banjo, and maybe
mandolin in the future.
In opening my mind to the genre, I also discovered a lot of beautiful
music that's...not quite bluegrass but...not quite anything else I've
heard either. I absolutely *love* the style and can't wait to meet up
with a friend of mine and put some pieces together. The main band I've
been following is [The Punch Brothers.](https://www.punchbrothers.com/)
[Chris Thile](https://wikipedia.org/wiki/Chris_Thile), the leader...holy
shit he's a *musician*. From classical to bluegrass to jazz, he's an
absolute madman. A couple of my favourite songs that The Punch Brothers
do are written by him: *[My Oh
My,](https://invidio.us/watch?v=staHSMEE1pw)* *[Julep,](
https://invidio.us/watch?v=lLdtEiUKDig)* *[Patchwork
Girlfriend,](https://invidio.us/watch?v=CMtyWB_Pzic)* and *[Between 1st
and A.](https://invidio.us/watch?v=2hsXcl4X5vQ)* The style is just so
unique and different yet has those evident bluegrass roots underpinning
it all.
---
This was posted as part of [#100DaysToOffload](https://100daystooffload.com/), an [awesome idea](https://fosstodon.org/@kev/104053977554016690) from [Kev Quirk](https://kevq.uk/). If you want to participate, just write something every day for 100 days and post a link on social media with the hashtag!
This was posted as part of
[#100DaysToOffload,](https://100daystooffload.com/) an [awesome
idea](https://fosstodon.org/@kev/104053977554016690) from [Kev
Quirk.](https://kevq.uk/) If you want to participate, just write
something every day for 100 days and post a link on social media with
the hashtag!

101
content/posts/calcurse-notifications.md

@ -12,59 +12,118 @@ tags:
- 100 Days To Offload
---
I recently started using [calcurse](https://github.com/lfos/calcurse) for my calendar and one of its limitations is good notification support in the generally accepted meaning of the word. The developer has [a different opinion](https://github.com/lfos/calcurse/issues/285#issuecomment-620841221) and that's perfectly alright but traditional notifications are a feature I heavily rely on and calcurse doesn't handle handle them very well; it leaves the user to figure something out on their own. Inspired by [one individual's issue](https://github.com/lfos/calcurse/issues/286#issue-608118188), I did just that.
I recently started using [calcurse](https://github.com/lfos/calcurse)
for my calendar and one of its limitations is good notification support
in the generally accepted meaning of the word. The developer has [a
different
opinion](https://github.com/lfos/calcurse/issues/285#issuecomment-620841221)
and that's perfectly alright but traditional notifications are a feature
I heavily rely on and calcurse doesn't handle handle them very well; it
leaves the user to figure something out on their own. Inspired by [one
individual's
issue,](https://github.com/lfos/calcurse/issues/286#issue-608118188) I
did just that.
A quick glance at `man calcurse` reveals this section:
```text
``` text
-n, --next
Print the first appointment within the next 24 hours. The
printed time is the number of hours and minutes left before
this appointment.
```
The output of running `calcurse -n`, for me and at the moment, looks like this:
```text
The output of running `calcurse -n`, for me and at the moment, looks
like this:
``` text
โฏ calcurse -n
next appointment:
[17:25] DnD on Mumble
```
It's all well and good but not really something you'd want in a notification; it needs to be filtered down so it only shows the name of the event, `DnD on Mumble`. To do this, I turned to the man pages of standard CLI utilities `tail` and `cut`. `tail` allows us to filter the output to only the last line[^1] with `tail -1`. `cut` is a little more complicated but will allow us to remove the first few columns of text. `cut -d ' ' -f 5-` is the next snippet in this one-liner. `-d ' '` tells cut to use a single space as the delimiter, `-f` specifies the fields to keep, and `-5` says to use all fields starting with the 5th because there are a few spaces preceding the content we want. Chain all of this mess together with pipes and we get:
```bash
It's all well and good but not really something you'd want in a
notification; it needs to be filtered down so it only shows the name of
the event, `DnD on Mumble`. To do this, I turned to the man pages of
standard CLI utilities `tail` and `cut`. `tail` allows us to filter the
output to only the last line[^1] with `tail -1`. `cut` is a little more
complicated but will allow us to remove the first few columns of text.
`cut -d ' ' -f 5-` is the next snippet in this one-liner. `-d ' '` tells
cut to use a single space as the delimiter, `-f` specifies the fields to
keep, and `-5` says to use all fields starting with the 5th because
there are a few spaces preceding the content we want. Chain all of this
mess together with pipes and we get:
``` bash
calcurse -n | tail -1 | cut -d ' ' -f 5-
```
Great. Now we need to actually get a notification containing the resulting string. This can be achieved by storing it in a variable then using it with `notify-send`. You likely already have `notify-send` installed if you're using Linux but, if you don't, I would recommend looking around to see what's default and using that instead.
```bash
Great. Now we need to actually get a notification containing the
resulting string. This can be achieved by storing it in a variable then
using it with `notify-send`. You likely already have `notify-send`
installed if you're using Linux but, if you don't, I would recommend
looking around to see what's default and using that instead.
``` bash
CONT="$(calcurse -n | tail -1 | cut -d ' ' -f 5- -)" && notify-send "Calcurse Event" "$CONT"
```
Now we're actually getting somewhere. With my setup, the notification looks like this:
![It's a screenshot of my desktop with a notification in the top right corner. The title is "Calcurse Event" and the text below is "DnD on Mumble". Surrounding the text is a solid border. Its position and the border are all that designate it as a notification: the background and text colour match the rest of my desktop which is themed with the base16-unikitty-dark scheme](/assets/jpgs/notification.jpg)
Now we're actually getting somewhere. With my setup, the notification
looks like this: ![It's a screenshot of my desktop with a notification
in the top right corner. The title is "Calcurse Event" and the text
below is "DnD on Mumble". Surrounding the text is a solid border. Its
position and the border are all that designate it as a notification: the
background and text colour match the rest of my desktop which is themed
with the base16-unikitty-dark scheme](/assets/jpgs/notification.jpg)
It's certainly passable and sufficient for some but I'd like an icon so
I can see what the notification is for out of the corner of my eye and
decide whether or not to glance over. Thankfully, `notify-send` has this
built in with the `-i` flag.
It's certainly passable and sufficient for some but I'd like an icon so I can see what the notification is for out of the corner of my eye and decide whether or not to glance over. Thankfully, `notify-send` has this built in with the `-i` flag.
```text
``` text
-i, --icon=ICON[,ICON...]
Specifies an icon filename or stock icon to display.
```
Now it's just a matter of figuring out what icon to use. You can certainly pass the path of whatever image you want to it, such as `~/Pictures/calendar-icon.png`, but I want something that fits in with the rest of my icons. These are found in:
```bash
Now it's just a matter of figuring out what icon to use. You can
certainly pass the path of whatever image you want to it, such as
`~/Pictures/calendar-icon.png`, but I want something that fits in with
the rest of my icons. These are found in:
``` bash
/usr/share/icons/<theme>/it/depends/on/theme
```
I use [Suru++ Dark](https://github.com/gusbemacbe/suru-plus-dark) and the icon I'm using can be found at:
```bash
I use [Suru++ Dark](https://github.com/gusbemacbe/suru-plus-dark) and
the icon I'm using can be found at:
``` bash
/usr/share/icons/Suru++-Dark/apps/32@2x/calendar.svg
```
It's different for Adwaita and all the rest though; you'll have to do some digging. It's also worth noting that, if you don't have this theme installed on another device, the icon won't show up.
It's different for Adwaita and all the rest though; you'll have to do
some digging. It's also worth noting that, if you don't have this theme
installed on another device, the icon won't show up.
After all that, here's my notification command and a screenshot.
```bash
``` bash
CONT="$(calcurse -n | tail -1 | cut -d ' ' -f 5-)" && notify-send -i /usr/share/icons/Suru++-Dark/apps/32@2x/calendar.svg "Calcurse Event" "$CONT"
```
![This is a screenshot like the last one but with an attractive icon to the left of the text](/assets/jpgs/notification-icon.jpg)
![This is a screenshot like the last one but with an attractive icon to
the left of the text](/assets/jpgs/notification-icon.jpg)
---
This was posted as part of [#100DaysToOffload](https://100daystooffload.com/), an [awesome idea](https://fosstodon.org/@kev/104053977554016690) from [Kev Quirk](https://kevq.uk/). If you want to participate, just write something every day for 100 days and post a link on social media with the hashtag!
[^1]: The opposite of `tail` is `head` and allows for exactly the same thing in reverse: `head -1` will return the first line of whatever input it's given.
This was posted as part of
[#100DaysToOffload,](https://100daystooffload.com/) an [awesome
idea](https://fosstodon.org/@kev/104053977554016690) from [Kev
Quirk.](https://kevq.uk/) If you want to participate, just write
something every day for 100 days and post a link on social media with
the hashtag!
[^1]: The opposite of `tail` is `head` and allows for exactly the same
thing in reverse: `head -1` will return the first line of whatever
input it's given.

58
content/posts/consuming-news.md

@ -17,40 +17,76 @@ tags:
- Workflow
toc: true
---
I [recently posted](https://social.nixnet.services/@amolith/103918629088941744) about getting through 487 feed items in less than half an hour and I thought I would write about my setup here. There are three primary applications that require some configuration:
I [recently
posted](https://social.nixnet.services/@amolith/103918629088941744)
about getting through 487 feed items in less than half an hour and I
thought I would write about my setup here. There are three primary
applications that require some configuration:
* [Feed reader](https://tt-rss.org/)
* [Browser](https://www.mozilla.org/firefox/new/)
* [Read-it-later service](https://wallabag.org)
## Tiny Tiny RSS
My feed reader of choice is TT-RSS. It's one of the most advanced readers I've ever used and can be tailored for any workflow. My basic preferences are below:
My feed reader of choice is TT-RSS. It's one of the most advanced
readers I've ever used and can be tailored for any workflow. My basic
preferences are below:
* โœ… Enable categories
* โœ… Combined mode
* โœ… Always expand articles[^1]
* โœ… Show content preview in headlines
Making use of the categories is *very* important; if you have a lot of feeds, getting through them is much easier when you can go topic by topic and leave some for when you have more time.
Making use of the categories is *very* important; if you have a lot of
feeds, getting through them is much easier when you can go topic by
topic and leave some for when you have more time.
In addition to categories, the *big* feature I make use of is keyboard shortcuts. You can view those from the hamburger menu[^2] in the top right at `Keyboard shortcuts help`. `n` and `o` is what I make use of more than any other; `n` goes to the next article (or scrolls in particularly long ones) and `o` opens the source in a new tab. This would be great except that most browsers automatically switch to that new tab. If you're just wanting to get it up there to deal with later as I do, this diversion is *incredibly* annoying. Thankfully, it can be disabled in Firefox ๐Ÿ˜
In addition to categories, the *big* feature I make use of is keyboard
shortcuts. You can view those from the hamburger menu[^2] in the top
right at `Keyboard shortcuts help`. `n` and `o` is what I make use of
more than any other; `n` goes to the next article (or scrolls in
particularly long ones) and `o` opens the source in a new tab. This
would be great except that most browsers automatically switch to that
new tab. If you're just wanting to get it up there to deal with later as
I do, this diversion is *incredibly* annoying. Thankfully, it can be
disabled in Firefox ๐Ÿ˜
## Firefox
This setting is pretty damn easy; open `about:config`, search for `loadDivertedInBackground`, and set it to true.
This setting is pretty damn easy; open `about:config`, search for
`loadDivertedInBackground`, and set it to true.
When you right-click something and open it in a new tab, you're automatically diverted to it. In some cases, this is convenient but I've always found it annoying and worked around it by middle clicking links. Changing this setting in `about:config` will make it so *all* tabs open in the background leaving your current tab focused.
When you right-click something and open it in a new tab, you're
automatically diverted to it. In some cases, this is convenient but I've
always found it annoying and worked around it by middle clicking links.
Changing this setting in `about:config` will make it so *all* tabs open
in the background leaving your current tab focused.
## wallabag
My read-it-later application is [wallabag](https://wallabag.org), a libre alternative to Mozilla's Pocket (which they still haven't made open source ๐Ÿ‘€). I use the [Firefox Add-on](https://addons.mozilla.org/en-US/firefox/addon/wallabagger/) so simply clicking the icon will send the URL to my server for download. I also have an application on [my eReader](https://us.kobobooks.com/products/kobo-aura-one-limited-edition) called [Wallabako](https://gitlab.com/anarcat/wallabako/). It downloads articles from wallabag as ePubs so I can read online articles while I'm offline as if they were books. A dream come true ๐Ÿ˜‰
My read-it-later application is [wallabag,](https://wallabag.org) a
libre alternative to Mozilla's Pocket (which they still haven't made
open source ๐Ÿ‘€). I use the [Firefox
Add-on](https://addons.mozilla.org/en-US/firefox/addon/wallabagger/) so
simply clicking the icon will send the URL to my server for download. I
also have an application on [my
eReader](https://us.kobobooks.com/products/kobo-aura-one-limited-edition)
called [Wallabako.](https://gitlab.com/anarcat/wallabako/) It downloads
articles from wallabag as ePubs so I can read online articles while I'm
offline as if they were books. A dream come true ๐Ÿ˜‰
## Entire workflow
With all that out of the way, here's my entire workflow.
1. Select topic of interest (category)
2. Start at the top and use `n` to quickly view the `n`ext headline and maybe a short preview of the content
2. Start at the top and use `n` to quickly view the `n`ext headline and
maybe a short preview of the content
3. If you want to read more, `o`pen it in the background
4. Continue pressing `n` and/or `o` until you get to the bottom
5. If you have time, move to the next category
6. Use `CTRL+Tab` to cycle through all the links you opened and send them to wallabag for consuming later
6. Use `CTRL+Tab` to cycle through all the links you opened and send
them to wallabag for consuming later
[^1]: Depending on what feeds you add, you might want to disable this. Slashdot makes up the bulk of my feed items and they generally fit on one page.
[^2]: A hamburger menu is three parallel horizontal lines typically styled as a button that expands to show a menu of some kind.
[^1]: Depending on what feeds you add, you might want to disable this.
Slashdot makes up the bulk of my feed items and they generally fit
on one page.
[^2]: A hamburger menu is three parallel horizontal lines typically
styled as a button that expands to show a menu of some kind.

183
content/posts/custom-streaming-setup.md

@ -13,23 +13,68 @@ tags:
- 100 Days To Offload
toc: true
---
The other day, I decided that I wanted to start streaming. I'll definitely be playing some games but I might also stream some other things like me playing music. We'll see where that goes. In any case, I don't like relying on third parties for things and didn't want to use Twitch so I started figuring out how to build my own open source and privacy-friendly "platform" (which is really just a [page](/live)).
The other day, I decided that I wanted to start streaming. I'll
definitely be playing some games but I might also stream some other
things like me playing music. We'll see where that goes. In any case, I
don't like relying on third parties for things and didn't want to use
Twitch so I started figuring out how to build my own open source and
privacy-friendly "platform" (which is really just a [page.](/live))
## The search for a platform
Before settling on my own custom thing, I did some digging into ready-made platforms I could just throw on one of my servers and run. Two of the ones I found were [OpenStreamingPlatform](https://openstreamingplatform.com/) and [Restreamer](https://datarhei.github.io/restreamer/). The latter isn't exactly what I was looking for but it could have worked quite well. The former, at first glance, was absolutely *perfect*. On a functional level, it still is. However, take a look at [the installation guide](https://wiki.openstreamingplatform.com/Install/Manual).
Before settling on my own custom thing, I did some digging into
ready-made platforms I could just throw on one of my servers and run.
Two of the ones I found were
[OpenStreamingPlatform](https://openstreamingplatform.com/) and
[Restreamer.](https://datarhei.github.io/restreamer/) The latter isn't
exactly what I was looking for but it could have worked quite well. The
former, at first glance, was absolutely *perfect*. On a functional
level, it still is. However, take a look at [the installation
guide.](https://wiki.openstreamingplatform.com/Install/Manual)
`<rant>`
Steps 3 and 7 are unnecessary unless you feel like manually compiling your web server; it's already available in the [Debian repos](https://packages.debian.org/buster/libnginx-mod-rtmp) and, by extension, Ubuntu's. It's even been backported to Stretch. In step 4, he has `sed -i 's/appendfsync everysec/appendfsync no/'`. Like so many application developers, he's assuming that this is the only project that will be installed on the system. If someone is already using redis in production and they have a different value there, that command will fail. In step 9, the commands are copying the SystemD service files to `/lib/systemd/` but this is where the package manager, `apt`, stores its services. When you have your own that you're writing or copying from somewhere else, best practise is to put them in `/etc/systemd/system`. In addition, all of this is scripted for the "standard" install. Yes, you're always supposed to review scripts before running them but who really does that? When I see a project whose only supported installation method is a script, I nope right on out of there for exactly this reason. I know how my system *is* set up and I know how I *want* it set up. I can't stand it when they assume they know what's best. Just tell me what you *recommend* and I'll make decisions from there.
Steps 3 and 7 are unnecessary unless you feel like manually compiling
your web server; it's already available in the [Debian
repos](https://packages.debian.org/buster/libnginx-mod-rtmp) and, by
extension, Ubuntu's. It's even been backported to Stretch. In step 4, he
has `sed -i 's/appendfsync everysec/appendfsync no/'`. Like so many
application developers, he's assuming that this is the only project that
will be installed on the system. If someone is already using redis in
production and they have a different value there, that command will
fail. In step 9, the commands are copying the SystemD service files to
`/lib/systemd/` but this is where the package manager, `apt`, stores its
services. When you have your own that you're writing or copying from
somewhere else, best practise is to put them in `/etc/systemd/system`.
In addition, all of this is scripted for the "standard" install. Yes,
you're always supposed to review scripts before running them but who
really does that? When I see a project whose only supported installation
method is a script, I nope right on out of there for exactly this
reason. I know how my system *is* set up and I know how I *want* it set
up. I can't stand it when they assume they know what's best. Just tell
me what you *recommend* and I'll make decisions from there.
`</rant>`
## NGINX & RTMP
RTMP stands for [Real-Time Messaging Protocol](https://wikipedia.org/wiki/Real-Time_Messaging_Protocol) and facilitates streaming audio, video, and other data over the internet in real-time. The NGINX module mentioned above adds functionality to NGINX that allows it to handle RTMP streams and turn them into something a browser or media streaming client can use. Connecting directly via `rtmp://example.com/live/stream` is not very widely supported so protocols such as [MPEG-DASH](https://wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP) and [HLS](https://wikipedia.org/wiki/HTTP_Live_Streaming) are used instead.
On Debian-based systems, adding RTMP functionality to NGINX is as simple as `apt install libnginx-mod-rtmp`. After that, you'll need to add some things to your `nginx.conf` and whatever host file you're using for your website.
```c
RTMP stands for [Real-Time Messaging
Protocol](https://wikipedia.org/wiki/Real-Time_Messaging_Protocol) and
facilitates streaming audio, video, and other data over the internet in
real-time. The NGINX module mentioned above adds functionality to NGINX
that allows it to handle RTMP streams and turn them into something a
browser or media streaming client can use. Connecting directly via
`rtmp://example.com/live/stream` is not very widely supported so
protocols such as
[MPEG-DASH](https://wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP)
and [HLS](https://wikipedia.org/wiki/HTTP_Live_Streaming) are used
instead.
On Debian-based systems, adding RTMP functionality to NGINX is as simple
as `apt install libnginx-mod-rtmp`. After that, you'll need to add some
things to your `nginx.conf` and whatever host file you're using for your
website.
``` c
rtmp {
server {
listen 1935;
@ -49,14 +94,22 @@ rtmp {
}
```
`1935` is the default RTMP port. `deny publish all` means you are denying *anyone* from publishing a stream (that includes you. `allow publish 127.0.0.1` allows *local* connections to publish content. I'm using this as a form of authentication---before streaming anything, I have to tunnel my connection to my server via SSH or a VPN. At the moment, I'm using SSH:
```text
`1935` is the default RTMP port. `deny publish all` means you are
denying *anyone* from publishing a stream (that includes you. `allow
publish 127.0.0.1` allows *local* connections to publish content. I'm
using this as a form of authentication---before streaming anything, I
have to tunnel my connection to my server via SSH or a VPN. At the
moment, I'm using SSH:
``` text
ssh -L 1935:localhost:1935 user@example.com
```
The other options are just the basics needed to get DASH and HLS to work. The only other thing to do is use NGINX as a reverse proxy (sort of) to serve the streams. Add this to your site's virtual host.
The other options are just the basics needed to get DASH and HLS to
work. The only other thing to do is use NGINX as a reverse proxy (sort
of) to serve the streams. Add this to your site's virtual host.
```c
``` c
location /dash {
root /tmp;
}
@ -65,22 +118,33 @@ location /hls {
}
```
That's it! Now you'll need to test your stream and verify that it actually works.
That's it! Now you'll need to test your stream and verify that it
actually works.
```bash
``` bash
ffmpeg -re -i video.mp4 -vcodec copy -loop -1 -c:a aac -b:a 160k -ar 44100 -strict -2 -f flv rtmp://example.com/live/stream
```
This command has FFmpeg play the video and stream it to the server. You should then be able to open the stream in something like [VLC](https://www.videolan.org/) or [MPV](https://mpv.io/) and watch it from anywhere.
```bash
This command has FFmpeg play the video and stream it to the server. You
should then be able to open the stream in something like
[VLC](https://www.videolan.org/) or [MPV](https://mpv.io/) and watch it
from anywhere.
``` bash
mpv https://example.com/dash/stream.mpd
```
However, I also wanted to embed it in a website and this is where it gets a little unstable.
However, I also wanted to embed it in a website and this is where it
gets a little unstable.
## Browser playback
`dash.js` is currently one of the best ways to play a live stream in a browser plus it's pretty easy to work with. The code can be found [on GitHub](https://github.com/Dash-Industry-Forum/dash.js). Using the setup with NGINX I detailed above, this should work perfectly fine out of the box.
```js
`dash.js` is currently one of the best ways to play a live stream in a
browser plus it's pretty easy to work with. The code can be found [on
GitHub.](https://github.com/Dash-Industry-Forum/dash.js) Using the setup
with NGINX I detailed above, this should work perfectly fine out of the
box.
``` js
<div>
<video id="videoPlayer" poster="/assets/jpgs/stream.jpg" controls></video>
</div>
@ -95,14 +159,38 @@ However, I also wanted to embed it in a website and this is where it gets a litt
```
## Web chat
The last thing every stream needs is something for web chat. I tried a few different solutions and had mixed results. The first was [KiwiIRC](https://kiwiirc.com/) but the iframe wouldn't even finish loading because it connected to so many third parties with a lot of tracking. It functions very well and I might set it up on my own site eventually but it was a bit much to go through at the time. As an intermediate solution, I embedded [my instance](https://irc.nixnet.services) of [The Lounge](https://thelounge.chat), a fully-functional web-based IRC client. This loaded perfectly right out of the box but it wasn't quite what I wanted; there were *too* many options and the friends of mine who tested it got frustrated because some of the essential UI elements were hidden due to the small viewport. It's just not quite suitable for embedded webchat.
Finally, I landed on [qwebirc](https://qwebirc.org/) and it was pretty much *exactly* what I wanted. When the iframe loads, you're prompted to enter a nick, you click connect, wait a minute, and done! My one complaint is that the theme is very bright but I'll work on that later on. It's good enough for now ๐Ÿ˜‰
**EDIT:** Since the time of writing, I have switched to hosting [KiwiIRC](https://kiwiirc.com/) on [Secluded.Site](https://chat.secluded.site) so all of the trackers and third parties aren't in use. My configs are below but I recommend going through [the wiki](https://github.com/kiwiirc/kiwiirc/wiki/Configuration-Options) and making your own decisions.
The last thing every stream needs is something for web chat. I tried a
few different solutions and had mixed results. The first was
[KiwiIRC](https://kiwiirc.com/) but the iframe wouldn't even finish
loading because it connected to so many third parties with a lot of
tracking. It functions very well and I might set it up on my own site
eventually but it was a bit much to go through at the time. As an
intermediate solution, I embedded [my
instance](https://irc.nixnet.services) of [The
Lounge,](https://thelounge.chat) a fully-functional web-based IRC
client. This loaded perfectly right out of the box but it wasn't quite
what I wanted; there were *too* many options and the friends of mine who
tested it got frustrated because some of the essential UI elements were
hidden due to the small viewport. It's just not quite suitable for
embedded webchat.
Finally, I landed on [qwebirc](https://qwebirc.org/) and it was pretty
much *exactly* what I wanted. When the iframe loads, you're prompted to
enter a nick, you click connect, wait a minute, and done! My one
complaint is that the theme is very bright but I'll work on that later
on. It's good enough for now ๐Ÿ˜‰
**EDIT:** Since the time of writing, I have switched to hosting
[KiwiIRC](https://kiwiirc.com/) on
[Secluded.Site](https://chat.secluded.site) so all of the trackers and
third parties aren't in use. My configs are below but I recommend going
through [the
wiki](https://github.com/kiwiirc/kiwiirc/wiki/Configuration-Options) and
making your own decisions.
`/etc/kiwiirc/config.conf`
```ini
``` ini
logLevel = 3
identd = false
gateway_name = "webircgateway"
@ -147,7 +235,8 @@ webirc = ""
```
`/etc/kiwiirc/client.json`
```json
``` json
{
"windowTitle": "Secluded.Site Chat",
"startupScreen": "welcome",
@ -211,14 +300,48 @@ webirc = ""
```
## Actually streaming
Once you're ready to start streaming content, I recommend using [OBS Studio](https://github.com/obsproject/obs-studio/). If you're noticing issues with stream performance, play around with your output resolution and FPS---those are the biggest factors. To use OBS with NGINX, you'll need to go to `Settings`, `Stream`, and set `Server` to `rtmp://localhost/live/`. If you're using my configs as they are, the key will need to be `stream`. Literally every component requires specific paths so, unless you're careful, things will break and you'll spend hours trying figure it out like I did. Also don't forget that the connection *has* to be tunnelled if you want authentication as I mentioned above. If you don't have `localhost:1935` on your streaming machine tunnelled to port 1935 on your server, OBS is going to throw errors about not being able to connect.
Once you're ready to start streaming content, I recommend using [OBS
Studio.](https://github.com/obsproject/obs-studio/) If you're noticing
issues with stream performance, play around with your output resolution
and FPS---those are the biggest factors. To use OBS with NGINX, you'll
need to go to `Settings`, `Stream`, and set `Server` to
`rtmp://localhost/live/`. If you're using my configs as they are, the
key will need to be `stream`. Literally every component requires
specific paths so, unless you're careful, things will break and you'll
spend hours trying figure it out like I did. Also don't forget that the
connection *has* to be tunnelled if you want authentication as I
mentioned above. If you don't have `localhost:1935` on your streaming
machine tunnelled to port 1935 on your server, OBS is going to throw
errors about not being able to connect.
## Summary
I'm pretty proud of [the set up](/live) I have now but it could still do with some improvements. For example, I plan to mess with the CSS and make both the video and chat panes *much* wider as well as side-by-side rather than on top of each other. Everything is crammed together and it's not a very good experience.
I'm pretty proud of [the set up](/live) I have now but it could still do
with some improvements. For example, I plan to mess with the CSS and
make both the video and chat panes *much* wider as well as side-by-side
rather than on top of each other. Everything is crammed together and
it's not a very good experience.
## References
This post has pieces taken from a few other articles and sites that also deserve a mention as well as a read. NGINX actually has an [official blog post](https://www.nginx.com/blog/video-streaming-for-remote-learning-with-nginx/) on setting up RTMP streaming (though they compile NGINX from source as well) that was a *massive* help. I also found another post that is very similar to this one about [HTML5 Live Streaming with MPEG-DASH](https://www.isrv.pw/html5-live-streaming-with-mpeg-dash). A good number of the parts are the same but I used the NGINX module in Debian repos and they used a fork of it with additional features. My NGINX setup was mostly from the NGINX blog post and the embedded stream was primarily from Inanity's. I figured out some of the components I could use for all of this from [Drew DeVault](https://live.drewdevault.com/).
This post has pieces taken from a few other articles and sites that also
deserve a mention as well as a read. NGINX actually has an [official
blog
post](https://www.nginx.com/blog/video-streaming-for-remote-learning-with-nginx/)
on setting up RTMP streaming (though they compile NGINX from source as
well) that was a *massive* help. I also found another post that is very
similar to this one about [HTML5 Live Streaming with
MPEG-DASH.](https://www.isrv.pw/html5-live-streaming-with-mpeg-dash) A
good number of the parts are the same but I used the NGINX module in
Debian repos and they used a fork of it with additional features. My
NGINX setup was mostly from the NGINX blog post and the embedded stream
was primarily from Inanity's. I figured out some of the components I
could use for all of this from [Drew
DeVault.](https://live.drewdevault.com/)
---
This was posted as part of [#100DaysToOffload](https://100daystooffload.com/), an [awesome idea](https://fosstodon.org/@kev/104053977554016690) from [Kev Quirk](https://kevq.uk/). If you want to participate, just write something every day for 100 days and post a link on social media with the hashtag!
This was posted as part of
[#100DaysToOffload,](https://100daystooffload.com/) an [awesome
idea](https://fosstodon.org/@kev/104053977554016690) from [Kev
Quirk.](https://kevq.uk/) If you want to participate, just write
something every day for 100 days and post a link on social media with
the hashtag!

23
content/posts/day-3.md

@ -10,10 +10,27 @@ tags:
- 100 Days To Offload
date: 2020-04-27T23:15:04-04:00
---
Well I had planned to write a post about music this evening but I just spend two hours making the post's cover image, a guitar. Lately, I've been *basing* my images on [Feather Icons](https://feathericons.com/) or [Font Awesome](https://fontawesome.com/). I might download one to use as a reference, download and modify, etc. but I've stopped using the icons as they are. This guitar, however, is an exception; I used the [Bezier Pen](https://www.tutorviacomputer.com/inkscape/the-bezier-tool/) and created it completely from scratch. It's still just a silhouette but I've always avoided this tool because it's so hard to use. You can view it on [my Gitea instance](https://git.nixnet.xyz/Amolith/secluded/src/branch/master/content/assets/pngs/guitar.png).
Anyway, this is my anti-climactic third day out of 100! Prepare for some music tomorrow ๐Ÿ˜‰
Well I had planned to write a post about music this evening but I just
spend two hours making the post's cover image, a guitar. Lately, I've
been *basing* my images on [Feather Icons](https://feathericons.com/) or
[Font Awesome.](https://fontawesome.com/) I might download one to use as
a reference, download and modify, etc. but I've stopped using the icons
as they are. This guitar, however, is an exception; I used the [Bezier
Pen](https://www.tutorviacomputer.com/inkscape/the-bezier-tool/) and
created it completely from scratch. It's still just a silhouette but
I've always avoided this tool because it's so hard to use. You can view
it on [my Gitea
instance.](https://git.nixnet.xyz/Amolith/secluded/src/branch/master/content/assets/pngs/guitar.png)
Anyway, this is my anti-climactic third day out of 100! Prepare for some
music tomorrow ๐Ÿ˜‰
---
This was posted as part of [#100DaysToOffload](https://100daystooffload.com/), an [awesome idea](https://fosstodon.org/@kev/104053977554016690) from [Kev Quirk](https://kevq.uk/). If you want to participate, just write something every day for 100 days and post a link on social media with the hashtag!
This was posted as part of
[#100DaysToOffload,](https://100daystooffload.com/) an [awesome
idea](https://fosstodon.org/@kev/104053977554016690) from [Kev
Quirk.](https://kevq.uk/) If you want to participate, just write
something every day for 100 days and post a link on social media with
the hashtag!

80
content/posts/day-6-updates.md

@ -13,24 +13,86 @@ tags:
- NixNet
- 100 Days To Offload
---
I haven't been able to come up with a specific topic for today so this is just a kind of generic update about me.
I haven't been able to come up with a specific topic for today so this
is just a kind of generic update about me.
## Zettelkasten
In my [previous post about Vim](/vim-as-a-markdown-editor/), I briefly mentioned being inspired to create a Zettelkasten by Daryl Sun in [his fourth 100 Days To Offload post](https://write.privacytools.io/darylsun/100-days-to-offload-day-4). A Zettelkasten is a personal knowledge management tool that allows one to quickly retrieve useful information about a subject, relearn forgotten concepts, and discover connections between those concepts to form entirely new ideas. There are different processes recommended by different people but I think it's a very personal choice and depends on what your workflow will look like. Mine will be as follows.
In my [previous post about Vim,](/vim-as-a-markdown-editor/) I briefly
mentioned being inspired to create a Zettelkasten by Daryl Sun in [his
fourth 100 Days To Offload
post.](https://write.privacytools.io/darylsun/100-days-to-offload-day-4)
A Zettelkasten is a personal knowledge management tool that allows one
to quickly retrieve useful information about a subject, relearn
forgotten concepts, and discover connections between those concepts to
form entirely new ideas. There are different processes recommended by
different people but I think it's a very personal choice and depends on
what your workflow will look like. Mine will be as follows.
1. Take *very* concise notes on something I learned in a *physical* notebook
2. When I'm able, go through those notes and add them to my [digital Zettelkasten](https://git.nixnet.xyz/Amolith/zettelkasten), expanding them a little and fleshing the thought out more
1. Take *very* concise notes on something I learned in a *physical*
notebook
2. When I'm able, go through those notes and add them to my [digital
Zettelkasten,](https://git.nixnet.xyz/Amolith/zettelkasten) expanding
them a little and fleshing the thought out more
The last step is *the most important* as this is the one where you sit down and think about what you're adding and try to draw connections between it and what you already know. The goal is not to make the longest and most complete notes in the world but to add value to each *concise* thought by linking it with others and build a web for you to explore later. You might not see immediate benefits but a mature Zettelkasten with hundreds of entries will constantly surprise you as you tumble into your own store of knowledge and rediscover things. That surprise is actually one of the greatest benefits to this kind of knowledge management system; when something is surprising, we tend to remember it better.
The last step is *the most important* as this is the one where you sit
down and think about what you're adding and try to draw connections
between it and what you already know. The goal is not to make the
longest and most complete notes in the world but to add value to each
*concise* thought by linking it with others and build a web for you to
explore later. You might not see immediate benefits but a mature
Zettelkasten with hundreds of entries will constantly surprise you as
you tumble into your own store of knowledge and rediscover things. That
surprise is actually one of the greatest benefits to this kind of
knowledge management system; when something is surprising, we tend to
remember it better.
## Doom Emacs
A friend of mine convinced my to try [Doom Emacs](https://github.com/hlissner/doom-emacs) and, so far, I am very impressed. Emacs itself is very powerful but, from what I can tell, this configuration adds a *lot* of value. The main one being Vim keybindings ๐Ÿ˜‰ I'm looking forward to learning [org-mode](https://orgmode.org/) and seeing what it can do for my productivity. As a text editor and programming tool, I plan to stick with [Neovim](https://neovim.io/) on desktop/laptop, [Vim](https://www.vim.org/) on Debian-based systems, [vi](https://wikipedia.org/wiki/Vi) wherever else.
A friend of mine convinced my to try [Doom
Emacs](https://github.com/hlissner/doom-emacs) and, so far, I am very
impressed. Emacs itself is very powerful but, from what I can tell, this
configuration adds a *lot* of value. The main one being Vim keybindings
๐Ÿ˜‰ I'm looking forward to learning [org-mode](https://orgmode.org/) and
seeing what it can do for my productivity. As a text editor and
programming tool, I plan to stick with [Neovim](https://neovim.io/) on
desktop/laptop, [Vim](https://www.vim.org/) on Debian-based systems,
[vi](https://wikipedia.org/wiki/Vi) wherever else.
## NixNet plans
Today, I fleshed out some of my thoughts on reprovisioning all of my over the summer. I'm going to have [Ansible](https://docs.ansible.com/) or [Salt](https://docs.saltstack.com/en/latest/) build and deploy [LXC](https://linuxcontainers.org/lxc/introduction/) containers to a baremetal server from [Hetzner](https://www.hetzner.com/sb) running a *very* minimal [Alpine Linux](https://alpinelinux.org/) installation. Whatever setup I have for those will of course be available on [Gitea](https://git.nixnet.xyz/NixNet). From there, my local NAS will use something like [borgmatic](https://torsion.org/borgmatic/) to back up files and databases from all of my servers and [LXD](https://linuxcontainers.org/lxd/introduction/) to create container snapshots[^1]. All of that will be mirrored to [BackBlaze](https://www.backblaze.com/) likely using their B2 model as paying per GB per month is generally the most reliable option. Under one of the others, there's always the possibility that I might upload more than they think is reasonable and start limiting me in some way.
Today, I fleshed out some of my thoughts on reprovisioning all of my
over the summer. I'm going to have [Ansible](https://docs.ansible.com/)
or [Salt](https://docs.saltstack.com/en/latest/) build and deploy
[LXC](https://linuxcontainers.org/lxc/introduction/) containers to a
baremetal server from [Hetzner](https://www.hetzner.com/sb) running a
*very* minimal [Alpine Linux](https://alpinelinux.org/) installation.
Whatever setup I have for those will of course be available on
[Gitea.](https://git.nixnet.xyz/NixNet) From there, my local NAS will
use something like [borgmatic](https://torsion.org/borgmatic/) to back
up files and databases from all of my servers and
[LXD](https://linuxcontainers.org/lxd/introduction/) to create container
snapshots[^1]. All of that will be mirrored to
[BackBlaze](https://www.backblaze.com/) likely using their B2 model as
paying per GB per month is generally the most reliable option. Under one
of the others, there's always the possibility that I might upload more
than they think is reasonable and start limiting me in some way.
Short-term, I'm going to consolidate some of my servers to a single baremetal machine from Hetzner. Long-term, I'm going to look into building and racking my own servers in a datacenter in Germany, likely one of Hetzner's. This comes with a plethora of benefits but a pretty major detriment: the up-front cost will be absolutely *massive*. Building a rack server worth putting in a datacenter will be incredibly expensive at the start. Following that, all I have to pay is a monthly fee for however much space it uses in the rack and it won't be too much. Before any of that is even considered, I'm going to be spending a lot of time discussing things with my father; he did a lot of racking before he got his current sysadmin job and has a ton of advice to give, from using VoIP to powercycle the server to what networking gear to look at and how to organise everything within the rack.
Short-term, I'm going to consolidate some of my servers to a single
baremetal machine from Hetzner. Long-term, I'm going to look into
building and racking my own servers in a datacenter in Germany, likely
one of Hetzner's. This comes with a plethora of benefits but a pretty
major detriment: the up-front cost will be absolutely *massive*.
Building a rack server worth putting in a datacenter will be incredibly
expensive at the start. Following that, all I have to pay is a monthly
fee for however much space it uses in the rack and it won't be too much.
Before any of that is even considered, I'm going to be spending a lot of
time discussing things with my father; he did a lot of racking before he
got his current sysadmin job and has a ton of advice to give, from using
VoIP to powercycle the server to what networking gear to look at and how
to organise everything within the rack.
I have a lot of really big plans.
[^1]: This one isn't *really* necessary as building the containers with Ansible/Salt is automated and it's a simple process to rebuild them. Snapshots might just take less time to redeploy should something go wrong.
[^1]: This one isn't *really* necessary as building the containers with
Ansible/Salt is automated and it's a simple process to rebuild them.
Snapshots might just take less time to redeploy should something go
wrong.

178
content/posts/documenting-with-mediawiki.md

@ -14,9 +14,27 @@ tags:
toc: true
---
Much to my chagrin, I've hardly posted anything at all the past couple of weeks. This is partly due to university summer classes starting and partly due to me putting some work into [NixNet's documentation](https://docs.nixnet.services). After listening to [Episode 4 of 2.5 Admins](https://2.5admins.com/2-5-admins-04/), I decided to change some things up with my infrastructure planning and, instead of automating all the things, document it first. Only after writing extensive documentation will I look into automating *portions* my setup, like hardening a server directly following installation. To that end, I've decided to use [MediaWiki](https://www.mediawiki.org/wiki/MediaWiki).
After [downloading](https://www.mediawiki.org/wiki/Download) and [installing](https://www.mediawiki.org/wiki/Manual:Installation_guide) MediaWiki, a very straightforward process[^1], the next step is configuring it. There is of course [a guide](https://www.mediawiki.org/wiki/Manual:System_administration) but I think it can be useful to see someone else's configuration to get ideas from as well, especially considering how many extensions there are. I won't go through *all* of the settings, just the maybe less obvious ones.
Much to my chagrin, I've hardly posted anything at all the past couple
of weeks. This is partly due to university summer classes starting and
partly due to me putting some work into [NixNet's
documentation.](https://docs.nixnet.services) After listening to
[Episode 4 of 2.5 Admins,](https://2.5admins.com/2-5-admins-04/) I
decided to change some things up with my infrastructure planning and,
instead of automating all the things, document it first. Only after
writing extensive documentation will I look into automating *portions*
my setup, like hardening a server directly following installation. To
that end, I've decided to use
[MediaWiki.](https://www.mediawiki.org/wiki/MediaWiki)
After [downloading](https://www.mediawiki.org/wiki/Download) and
[installing](https://www.mediawiki.org/wiki/Manual:Installation_guide)
MediaWiki, a very straightforward process,[^1] the next step is
configuring it. There is of course [a
guide](https://www.mediawiki.org/wiki/Manual:System_administration) but
I think it can be useful to see someone else's configuration to get
ideas from as well, especially considering how many extensions there
are. I won't go through *all* of the settings, just the maybe less
obvious ones.
## URLs
The first thing in `LocalSettings.php` is `$wgScriptPath`. Different wikis take vastly different approaches for this. Some fill that variable with `"/w"` (default), some with `"/view"`, and some with something entirely different. [Wikipedia](https://wikipedia.org/wiki/MediaWiki) and all of its children use `"/wiki"`. While well and good, the default configuration will have your URLs appearing as `example.com/wiki/index.php?title=<page>` and this is bad practise for SEO; if you want your pages easily discoverable, the URLs need to be a bit shorter. The easiest way I've found to do this is add all of six lines to my NGINX config and set `$wgScriptPath` to `""` (an empty string).
@ -29,13 +47,38 @@ location @rewrite {
}
```
The snippet above tells NGINX to rewrite all of your site's base URLs and remove `index.php?title=` from them. This is a similar approach to what [Mozilla](https://wiki.mozilla.org/Main_Page) has done. The result is cleaner URLs that comply with SEO best practises and a setup that avoids [moving MediaWiki to the site's root](https://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory).
The snippet above tells NGINX to rewrite all of your site's base URLs
and remove `index.php?title=` from them. This is a similar approach to
what [Mozilla](https://wiki.mozilla.org/Main_Page) has done. The result
is cleaner URLs that comply with SEO best practises and a setup that
avoids [moving MediaWiki to the site's
root.](https://www.mediawiki.org/wiki/Manual:Wiki_in_site_root_directory)
## Mobile view
I see a *lot* of MediaWiki instances without a good mobile version and, other than keeping the number of extensions down, I don't really understand why. Setting it up is incredibly easy and gives everyone a *much* better experience. The [Minerva Neue](https://www.mediawiki.org/wiki/Special:MyLanguage/Skin:Minerva_Neue) skin is designed specifically for use on mobile devices and is also much more aggressive about optimisation. Though editing is a terrible experience, it also looks great on desktop. The [MobileFrontend](https://www.mediawiki.org/wiki/Extension:MobileFrontend) extension is used to detect the reader's device and serve them either the configured desktop skin or Minerva Neue. You *could* serve a different skin on mobile but I've found that Minerva Neue looks the best by far.
To set them up, you'll need to download [the skin](https://www.mediawiki.org/wiki/Special:SkinDistributor/MinervaNeue) and [the extension](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/MobileFrontend). From there, you'll need to add a few lines to your config file. On a side note, I love how dynamic MediaWiki can be, especially with downloads; providing a copy/paste extraction command that doesn't use wildcards and puts it in the correct directory is *awesome*.
```php
I see a *lot* of MediaWiki instances without a good mobile version and,
other than keeping the number of extensions down, I don't really
understand why. Setting it up is incredibly easy and gives everyone a
*much* better experience. The [Minerva
Neue](https://www.mediawiki.org/wiki/Special:MyLanguage/Skin:Minerva_Neue)
skin is designed specifically for use on mobile devices and is also much
more aggressive about optimisation. Though editing is a terrible
experience, it also looks great on desktop. The
[MobileFrontend](https://www.mediawiki.org/wiki/Extension:MobileFrontend)
extension is used to detect the reader's device and serve them either
the configured desktop skin or Minerva Neue. You *could* serve a
different skin on mobile but I've found that Minerva Neue looks the best
by far.
To set them up, you'll need to download [the
skin](https://www.mediawiki.org/wiki/Special:SkinDistributor/MinervaNeue)
and [the
extension.](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/MobileFrontend)
From there, you'll need to add a few lines to your config file. On a
side note, I love how dynamic MediaWiki can be, especially with
downloads; providing a copy/paste extraction command that doesn't use
wildcards and puts it in the correct directory is *awesome*.
``` php
# I recommend putting this with the rest of your extensions
wfLoadExtension( 'MobileFrontend' );
@ -44,26 +87,58 @@ $wgMFDefaultSkinClass = 'SkinMinerva';
$wgMFAutodetectMobileView = true;
```
With the skin and extension in place and those lines in your config, save and reload and there should be a link at the bottom of your wiki called `Mobile view`. Click it and you'll see Minerva! On a phone, MobileFrontend will automatically serve it but you can force your default theme by clicking `Desktop view` in the same location.
With the skin and extension in place and those lines in your config,
save and reload and there should be a link at the bottom of your wiki
called `Mobile view`. Click it and you'll see Minerva! On a phone,
MobileFrontend will automatically serve it but you can force your
default theme by clicking `Desktop view` in the same location.
![Screenshot of the mobile versions of my MediaWiki instance. The left uses Minerva Neue and the right uses Vector. The left has buttons and icons that are much larger and easier to tap making for better accessibility. Though the text is readable, the touch targets are much too small navigation is hell](/assets/pngs/mediawiki-skins.png)
<center><p>Left is Vector (default) and right is Minerva Neue</p></center>
![Screenshot of the mobile versions of my MediaWiki instance. The left
uses Minerva Neue and the right uses Vector. The left has buttons and
icons that are much larger and easier to tap making for better
accessibility. Though the text is readable, the touch targets are much
too small navigation is hell](/assets/pngs/mediawiki-skins.png)
## Discussion pages
The default discussion page for MediaWiki works but, unless you're already used to it, it can be quite odd for new people. That's where the [StructuredDiscussions](https://www.mediawiki.org/wiki/Structured_Discussions) extension comes in. Here's a comparison of before and after enabling it.
![side-by-side screenshot of my wiki before and after enabling the extension. the left really is just the default content editor. it's like giving someone a text editor on a server and asking them to have a conversation with someone else by editing the same file and saving it to see replies. the right side is with the extension enabled and gives buttons to browse by topic and a field to create a new topic. it's very similar to github's issue tracker, for example, but without the ability to sort by tags](/assets/pngs/talk-before-after.png)
<center><p>Left is without StructuredDiscussions and right is with</p></center>
As I said, the left works but most people wouldn't know what to do when given the default MediaWiki editor and it raises the barrier for entry. The right is *much* more user-friendly and works exactly how one would expect. StructuredDiscussions does have a few dependencies but they're easy to add. [Echo](https://www.mediawiki.org/wiki/Extension:Echo) is for notifications and the others are included by default. After [installing it](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Echo), and [StructuredDiscussions](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Flow), add the following lines to your `LocalSettings.php`.
```php
The default discussion page for MediaWiki works but, unless you're
already used to it, it can be quite odd for new people. That's where the
[StructuredDiscussions](https://www.mediawiki.org/wiki/Structured_Discussions)
extension comes in. Here's a comparison of before and after enabling it.
![side-by-side screenshot of my wiki before and after enabling the
extension. the left really is just the default content editor. it's like
giving someone a text editor on a server and asking them to have a
conversation with someone else by editing the same file and saving it to
see replies. the right side is with the extension enabled and gives
buttons to browse by topic and a field to create a new topic. it's very
similar to github's issue tracker, for example, but without the ability
to sort by tags](/assets/pngs/talk-before-after.png)
As I said, the left works but most people wouldn't know what to do when
given the default MediaWiki editor and it raises the barrier for entry.
The right is *much* more user-friendly and works exactly how one would
expect. StructuredDiscussions does have a few dependencies but they're
easy to add. [Echo](https://www.mediawiki.org/wiki/Extension:Echo) is
for notifications and the others are included by default. After
[installing
it,](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Echo)
and
[StructuredDiscussions,](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/Flow)
add the following lines to your `LocalSettings.php`.
``` php
# With the rest of your extensions
wfLoadExtension( 'Echo' );
wfLoadExtension( 'Flow' );
```
Running the following commands is necessary because MediaWiki's database needs modification to support the extension. General talk pages are `--ns=1` and `User:Talk` pages are `--ns=3`. If you only want Structured Discussions enabled for one of them, only run that one. I personally recommend doing it for all.
```text
Running the following commands is necessary because MediaWiki's database
needs modification to support the extension. General talk pages are
`--ns=1` and `User:Talk` pages are `--ns=3`. If you only want Structured
Discussions enabled for one of them, only run that one. I personally
recommend doing it for all.
``` text
php maintenance/populateContentModel.php --wiki=somewiki --ns=1 --table=revision
php maintenance/populateContentModel.php --wiki=somewiki --ns=1 --table=archive
php maintenance/populateContentModel.php --wiki=somewiki --ns=1 --table=page
@ -73,35 +148,78 @@ php maintenance/populateContentModel.php --wiki=somewiki --ns=3 --table=archive
php maintenance/populateContentModel.php --wiki=somewiki --ns=3 --table=page
```
After that, add these to actually enable the extension. To temporarily disable it, you can comment them out but I don't know how that will affect talk pages that already exist.
```php
After that, add these to actually enable the extension. To temporarily
disable it, you can comment them out but I don't know how that will
affect talk pages that already exist.
``` php
# Flow (discussions) configuration
$wgNamespaceContentModels[NS_TALK] = 'flow-board';
$wgNamespaceContentModels[NS_USER_TALK] = 'flow-board';
```
## Subpages
One of the features I'll be making heavy use of for my [Privacy Policies](https://docs.nixnet.services/Category:Privacy_policies) and [Terms of Service](https://docs.nixnet.services/Category:Terms_of_Service) pages is [Subpages](https://www.mediawiki.org/wiki/Help:Subpages). This allows you to create pages entitled `Parent/Child` and the child automatically links back to the parent at the top. This can be seen in [Mozilla](https://wiki.mozilla.org/Apps/Security/Other) and [Arch Linux's](https://wiki.archlinux.org/index.php/Firefox/Privacy) wikis right under the header and [in mine as well](https://docs.nixnet.services/DNS/Privacy). Enabling it is quite simple; just add the following line to your config.
```php
One of the features I'll be making heavy use of for my [Privacy
Policies](https://docs.nixnet.services/Category:Privacy_policies) and
[Terms of
Service](https://docs.nixnet.services/Category:Terms_of_Service) pages
is [Subpages.](https://www.mediawiki.org/wiki/Help:Subpages) This allows
you to create pages entitled `Parent/Child` and the child automatically
links back to the parent at the top. This can be seen in
[Mozilla](https://wiki.mozilla.org/Apps/Security/Other) and [Arch
Linux's](https://wiki.archlinux.org/index.php/Firefox/Privacy) wikis
right under the header and [in mine as
well.](https://docs.nixnet.services/DNS/Privacy) Enabling it is quite
simple; just add the following line to your config.
``` php
## Enable subpages for all namespaces
$wgNamespacesWithSubpages[NS_MAIN] = true;
```
## Syntax highlighting
The final configuration change I've made (so far) has been to enable syntax highlighting in the default editor with [CodeMirror](https://www.mediawiki.org/wiki/Extension:CodeMirror). After [installing it](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/CodeMirror), add these lines to your config and you're done!
```php
The final configuration change I've made (so far) has been to enable
syntax highlighting in the default editor with
[CodeMirror.](https://www.mediawiki.org/wiki/Extension:CodeMirror) After
[installing
it,](https://www.mediawiki.org/wiki/Special:ExtensionDistributor/CodeMirror)
add these lines to your config and you're done!
``` php
# Place with the other extensions as always
wfLoadExtension( 'CodeMirror' );
# Enables it by default but allows users to disable it
$wgDefaultUserOptions['usecodemirror'] = 1;
```
![screenshot of the mediawiki editor. headers are larger, code blocks are highlighted, links blue with link text black so it's easy to pick out, etc. In all, it's a much nicer experience.](/assets/pngs/mediawiki-highlight.png)
![screenshot of the mediawiki editor. headers are larger, code blocks
are highlighted, links blue with link text black so it's easy to pick
out, etc. In all, it's a much nicer
experience.](/assets/pngs/mediawiki-highlight.png)
## Editing in Vim
The final tip I have is that you can edit pretty much *any* MediaWiki instance in Vim, including Wikipedia itself, with [a simple plugin](https://github.com/aquach/vim-mediawiki-editor). The only drawback I've found is that, unless you store your password in your config, you'll have to enter it every time you close and reopen Vim. You can also give Vim [Wikitext syntax highlighting](https://en.wikipedia.org/wiki/Help:Text_editor_support#Vim) for creating MediaWiki pages when offline. A few days ago, my wiki was completely offline while taking a disk image backup but I still wrote the majority of the [libvirt](https://docs.nixnet.services/Libvirt) and [Debian](https://docs.nixnet.services/Debian) pages while I waited and the highlighting was really nice.
The final tip I have is that you can edit pretty much *any* MediaWiki
instance in Vim, including Wikipedia itself, with [a simple
plugin.](https://github.com/aquach/vim-mediawiki-editor) The only
drawback I've found is that, unless you store your password in your
config, you'll have to enter it every time you close and reopen Vim. You
can also give Vim [Wikitext syntax
highlighting](https://en.wikipedia.org/wiki/Help:Text_editor_support#Vim)
for creating MediaWiki pages when offline. A few days ago, my wiki was
completely offline while taking a disk image backup but I still wrote
the majority of the [libvirt](https://docs.nixnet.services/Libvirt) and
[Debian](https://docs.nixnet.services/Debian) pages while I waited and
the highlighting was really nice.
---
This was posted as part of [#100DaysToOffload](https://100daystooffload.com/), an [awesome idea](https://fosstodon.org/@kev/104053977554016690) from [Kev Quirk](https://kevq.uk/). If you want to participate, just write something every day for 100 days and post a link on social media with the hashtag!
[^1]: If you're having issues, feel free to contact me and I'll help where I can.
This was posted as part of
[#100DaysToOffload,](https://100daystooffload.com/) an [awesome
idea](https://fosstodon.org/@kev/104053977554016690) from [Kev
Quirk.](https://kevq.uk/) If you want to participate, just write
something every day for 100 days and post a link on social media with
the hashtag!
[^1]: If you're having issues, feel free to contact me and I'll help
where I can.

39
content/posts/downloading-courses-from-linux-academy.md

@ -12,13 +12,20 @@ tags:
- Training
toc: true
---
## Forward
Every month, Linux Academy releases courses for free. I'm a very busy college student and don't have time to whirl through everything I want to before it goes behind their paywall again so I figured out how to download a course or two every month using [`youtube-dl`](https://github.com/ytdl-org/youtube-dl/).
Every month, Linux Academy releases courses for free. I'm a very busy
college student and don't have time to whirl through everything I want
to before it goes behind their paywall again so I figured out how to
download a course or two every month using
[`youtube-dl`.](https://github.com/ytdl-org/youtube-dl/)
## Setup
* Install [`youtube-dl`](https://ytdl-org.github.io/youtube-dl/download.html)
* Install
[`youtube-dl`](https://ytdl-org.github.io/youtube-dl/download.html)
* Make sure you have a browser handy
* Create a community account on [Linux Academy](https://linuxacademy.com/join/community)
* Create a community account on [Linux
Academy](https://linuxacademy.com/join/community)
* Get some food
* Maybe a drink
* Sit back down in your chair
@ -28,7 +35,8 @@ Every month, Linux Academy releases courses for free. I'm a very busy college st
## Downloading
* Log into your account
* Pick the course you want
* Open the developer console and go to `Network` (Ctrl+Shift+E in Firefox)
* Open the developer console and go to `Network` (Ctrl+Shift+E in
Firefox)
* You'll want to select `Media` as shown in the screenshot below
![](/assets/posts/linux-academy/scrot-1.png)
@ -43,24 +51,35 @@ Every month, Linux Academy releases courses for free. I'm a very busy college st
* Copy the URL
* Paste it after `youtube-dl` in a terminal:
```bash
``` bash
amolith@poseidon:~ $ youtube-dl https://video-cdn.linuxacademy.com/vods3/_definst_/smil:box/cdnstore/modules/lots-of-stuff-in-here
```
* Press enter
* Watch the magic unfold
At a high level, `youtube-dl` is acting like your browser and following the `m3u` playlist to download chunks of the file. After it fetches them all, it runs them through `ffmpeg` to stitch them together into a single video!
At a high level, `youtube-dl` is acting like your browser and following
the `m3u` playlist to download chunks of the file. After it fetches them
all, it runs them through `ffmpeg` to stitch them together into a single
video!
I found it useful to open a text editor and script downloading a whole course at a time. All you have to do is type `youtube-dl -o` and copy/paste it however many times there are videos. Then, copy and paste the video title in quotes after `-o` and add `.mp4` to the end (command example below). After that, paste the URL. Do that with every video in the series, save the script, run `chmod +x <script>`, then `./<script>` and (after a bit) you'll have an entire course you can watch at your leasure!
I found it useful to open a text editor and script downloading a whole
course at a time. All you have to do is type `youtube-dl -o` and
copy/paste it however many times there are videos. Then, copy and paste
the video title in quotes after `-o` and add `.mp4` to the end (command
example below). After that, paste the URL. Do that with every video in
the series, save the script, run `chmod +x <script>`, then `./<script>`
and (after a bit) you'll have an entire course you can watch at your
leasure!
```bash
``` bash
amolith@poseidon:~ $ youtube-dl -o "04 - Conclusion and Next Steps.mp4" https://video-cdn.linuxacademy.com/vods3/_definst_/smil:box/cdnstore/modules/lots-of-stuff-here
```
**NOTE:** You may want to set up your directory structure beforehand so it's easier to script the process. Here's an example of one of mine:
**NOTE:** You may want to set up your directory structure beforehand so
it's easier to script the process. Here's an example of one of mine:
```bash
``` bash
amolith@poseidon:~/Videos/Courses/Ansible - Playbooks Deep Dive $ tree
.
โ”œโ”€โ”€ 01 - Course Overview

67
content/posts/excluding-your-site-from-the-wayback-machine-keybase-only.md

@ -12,27 +12,74 @@ tags:
- Sysadmin
toc: true
---
## Preface
There may be a myriad of reasons you want to do this, from removing sensitive information to regaining a measure of control over your content. Whatever your purpose, below should be a quick and easy way to achieve it.
There may be a myriad of reasons you want to do this, from removing
sensitive information to regaining a measure of control over your
content. Whatever your purpose, below should be a quick and easy way to
achieve it.
## For domains you own
The easiest way to verify you own a domain is to put a text file in an easily accessible location and email [info@archive.org](mailto:info@archive.org) asking for removal and link to it. Mine is at [removal-request.txt](https://nixnet.services/removal-request.txt). It would be better if you didn't copy mine word-for-word and wrote your own instead though ๐Ÿ˜‰
The easiest way to verify you own a domain is to put a text file in an
easily accessible location and email
[info@archive.org](mailto:info@archive.org) asking for removal and link
to it. Mine is at
[removal-request.txt.](https://nixnet.services/removal-request.txt) It
would be better if you didn't copy mine word-for-word and wrote your own
instead though ๐Ÿ˜‰
If that's all you intend to do, this should be sufficient and there's no need to read any further. If you want to exclude your *profiles* as well (for example, all your GitHub repos, Twitter, Mastodon, etc.) read on.
If that's all you intend to do, this should be sufficient and there's no
need to read any further. If you want to exclude your *profiles* as well
(for example, all your GitHub repos, Twitter, Mastodon, etc.) read on.
## For domains you *don't* own
There are a few things I used that worked in harmony to verify my other accounts. [Keybase](https://keybase.io/) was the most useful for this purpose. It is a proprietary service but I deem the level of proof it facilitates worth compromising for.
There are a few things I used that worked in harmony to verify my other
accounts. [Keybase](https://keybase.io/) was the most useful for this
purpose. It is a proprietary service but I deem the level of proof it
facilitates worth compromising for.
The other tool I used was [GPG](https://gnupg.org/). For the sake of keeping it simple, *this* guide will just deal with GPG from within Keybase. I ***really*** recommend actually learning to use GPG on its own; it's wonderful for protecting your privacy and verifying your identity in a multitude of situations. The next post will be on using GPG *outside* of Keybase for this so [stay tuned](/posts/index.xml).
The other tool I used was [GPG.](https://gnupg.org/) For the sake of
keeping it simple, *this* guide will just deal with GPG from within
Keybase. I ***really*** recommend actually learning to use GPG on its
own; it's wonderful for protecting your privacy and verifying your
identity in a multitude of situations. The next post will be on using
GPG *outside* of Keybase for this so [stay tuned.](/posts/index.xml)
### Generating your key
After creating your Keybase account, click "add a PGP key", "I need a public key", then enter the requisite information. You should use whatever name is associated with the account you'll be emailing Archive.org from as well as that address. Wait a bit while it generates the key . . .
After creating your Keybase account, click "add a PGP key", "I need a
public key", then enter the requisite information. You should use
whatever name is associated with the account you'll be emailing
Archive.org from as well as that address. Wait a bit while it generates
the key...
### Verifying some accounts
This is where you verify whatever accounts you want removed. Just click the option and go through the steps! Aside from personal websites, Twitter, GitHub, Reddit, etc., you can also prove accounts on a lot of other services (including Mastodon). More are being added every day so check back if there's something specific you want to address.
This is where you verify whatever accounts you want removed. Just click
the option and go through the steps! Aside from personal websites,
Twitter, GitHub, Reddit, etc., you can also prove accounts on a lot of
other services (including Mastodon). More are being added every day so
check back if there's something specific you want to address.
Once this is done, you'll be ready to contact Archive.org about getting your stuff removed.
Once this is done, you'll be ready to contact Archive.org about getting
your stuff removed.
### Signing some messages
In the top right of Keybase, you'll see this pencil: <i class="fa fa-pencil"></i>. Click it and you'll be taken to a page with a text box. This is where you'll type your email and the text file for your website proof. For the text file, copy the signed message and paste it into your text editor, save, and put it at the root of your website. For example, mine is at [removal-request.txt](https://nixnet.services/removal-request.txt). It would be better if you didn't copy mine word for word and wrote your own ๐Ÿ˜‰ For the email, you'll do the same thing but paste the signed message into your email client, whether that's Thunderbird, ProtonMail, Tutanota, etc. The text file only needs to contain the request for the (sub)domain removal. The email needs to contain the request for everything along with links to the text file, you Keybase account, and whatever you want removed.
In the top right of Keybase, you'll see a pencil. Click it and you'll be
taken to a page with a text box. This is where you'll type your email
and the text file for your website proof. For the text file, copy the
signed message and paste it into your text editor, save, and put it at
the root of your website. For example, mine is at
[removal-request.txt.](https://nixnet.services/removal-request.txt) It
would be better if you didn't copy mine word for word and wrote your own
๐Ÿ˜‰ For the email, you'll do the same thing but paste the signed message
into your email client, whether that's Thunderbird, ProtonMail,
Tutanota, etc. The text file only needs to contain the request for the
(sub)domain removal. The email needs to contain the request for
everything along with links to the text file, you Keybase account, and
whatever you want removed.
Before sending it, you should also go back to your profile, click your key, and copy everything in the text box that starts with `-----BEGIN PGP PUBLIC KEY BLOCK-----`. Paste that into another text file but save it with the `.asc` extension. For example, `key.asc`. Attach this to the email, send it to [info@archive.org](mailto:info@archive.org), wait a couple days, and you're done!
Before sending it, you should also go back to your profile, click your
key, and copy everything in the text box that starts with `-----BEGIN
PGP PUBLIC KEY BLOCK-----`. Paste that into another text file but save
it with the `.asc` extension. For example, `key.asc`. Attach this to the
email, send it to [info@archive.org,](mailto:info@archive.org) wait a
couple days, and you're done!

41
content/posts/lossless-screen-recording.md

@ -11,27 +11,52 @@ tags:
- CLI
- Minimalism
---
I've been trying off and on for the past few weeks to figure out how to record my 1920x1080 monitor. The recording is going to be some music videos for a friend. Originally, it was just going to be a single background image for the whole video then I had the idea of using [cava](https://github.com/karlstav/cava) in a transparent terminal on top of the background. This didn't work at all because it actually kept freezing when I tried to record it. So I tried switching to [ncmpcpp](http://ncmpcpp.rybczak.net/)'s visualiser. This still had horrible lag so I've been puzzling over how to use ffmpeg to *losslessly* record my second monitor. The reason OBS and similar screen recorders are so slow is because, most of the time, they encode to the end format while recording and that uses a lot of system resources. I finally figured it out and have pasted the command below.
```bash
I've been trying off and on for the past few weeks to figure out how to
record my 1920x1080 monitor. The recording is going to be some music
videos for a friend. Originally, it was just going to be a single
background image for the whole video then I had the idea of using
[cava](https://github.com/karlstav/cava) in a transparent terminal on
top of the background. This didn't work at all because it actually kept
freezing when I tried to record it. So I tried switching to
[ncmpcpp's visualiser.](http://ncmpcpp.rybczak.net/) This still had
horrible lag so I've been puzzling over how to use ffmpeg to
*losslessly* record my second monitor. The reason OBS and similar screen
recorders are so slow is because, most of the time, they encode to the
end format while recording and that uses a lot of system resources. I
finally figured it out and have pasted the command below.
``` bash
ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -draw_mouse 0 -i :0.0+1366,0 -c:v libx264 -crf 0 -preset ultrafast output.mkv
```
Above is exactly what I used for my 1080p monitor with 768p laptop screen. I've modified the command so you can see what you need to edit for your use-case.
Above is exactly what I used for my 1080p monitor with 768p laptop
screen. I've modified the command so you can see what you need to edit
for your use-case.
```bash
``` bash
ffmpeg -video_size <target-resolution> -framerate 30 -f x11grab -i :0.0+<width-of-unused-monitor>,0 -c:v libx264 -crf 0 -preset ultrafast <filename>.mkv
```
If you do *not* want the cursor recorded, add `-draw_mouse 0` directly after `x11grab` like I did in the first command.
If you do *not* want the cursor recorded, add `-draw_mouse 0` directly
after `x11grab` like I did in the first command.
My video was 470mb for a ~13 minute video. If you're going to archive the recording or are concerned about file size, re-encode it with a slower preset. This will be a lot slower and take a lot of CPU but the resulting file is *significantly* smaller than the original and still lossless. I this as a general purpose screen recorder. Previously, I was using OBS and the lag in the video was incredible but with ffmpeg, it's smooth as butter. The command for re-encoding is below:
My video was 470mb for a ~13 minute video. If you're going to archive
the recording or are concerned about file size, re-encode it with a
slower preset. This will be a lot slower and take a lot of CPU but the
resulting file is *significantly* smaller than the original and still
lossless. I this as a general purpose screen recorder. Previously, I was
using OBS and the lag in the video was incredible but with ffmpeg, it's
smooth as butter. The command for re-encoding is below:
```bash
``` bash
ffmpeg -i output.mkv -c:v libx264 -crf 0 -preset veryslow output-smaller.mkv
```
![](/assets/gifs/ffmpeg-lossless.gif)
## Note
This command only works with X, not Wayland. Skimming `ffmpeg`'s man page, I see that `video4linux2` is another option for capturing video so you may be able to replace `x11grab` with it for the same result. I have not tested this so I don't know if it'll work or not.
This command only works with X, not Wayland. Skimming `ffmpeg`'s man
page, I see that `video4linux2` is another option for capturing video so
you may be able to replace `x11grab` with it for the same result. I have
not tested this so I don't know if it'll work or not.

13
content/posts/moving-my-old-blog.md

@ -1,13 +0,0 @@
---
title: "Moving My Old Blog"
description: "Moving my blog on nixnet.services to Secluded.Site"
cover: /assets/pngs/editor.png
date: 2020-09-23T18:09:15-04:00
categories:
- Meta
---
Just a heads up to those subscribed to this RSS feed: I'll be moving my posts on nixnet.services to secluded.site either today or tomorrow. I'm leaving their timestamps as they are so I don't know how they'll appear in your feed. I apologise for any mess they cause!
Hello world!

166