move posts to secluded.site

This commit is contained in:
Amolith 2020-06-08 15:37:26 -04:00
parent 5e9ea83644
commit bf4923d2ca
Signed by: Amolith
GPG Key ID: CA3EFC40662C19BA
8 changed files with 0 additions and 291 deletions

View File

@ -1,26 +0,0 @@
---
layout: post
title: Lossless screen recording
subtitle: Never waste resources with OBS again
description: Recording your screen (or monitors) with ffmpeg for a high-quality lossless video that uses very little system resources
tags: minimalism cli
cover: /assets/ffmpeg-lossless.png
date: 2018-08-12 17:15:20
---
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.
`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.
`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.
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:
`ffmpeg -i output.mkv -c:v libx264 -crf 0 -preset veryslow output-smaller.mkv`
![](/assets/ffmpeg-lossless.gif)
# <center>EDIT:</center>
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.

View File

@ -1,20 +0,0 @@
---
layout: post
title: Arch spin pt. 1 - The perfect bootable
subtitle: "There's no such thing . . . yet"
description: 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.
cover: /assets/arch-spin/pt-1.png
tags: arch-spin
date: 2018-8-15 10:38
---
# Thus begins the journey
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.
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.
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 😉

View File

@ -1,16 +0,0 @@
---
layout: post
title: Arch spin pt. 2 - Initial setup
subtitle: First steps to rolling your own spin
description: Setting up the basics for build your own Arch-based spin with archiso, the official development tool
tags: arch-spin
cover: /assets/arch-spin/pt-2.png
date: 2018-08-17 14:11:07
---
*I **think** I'm going to call it a spin . . .*
1. Install the package `archiso` from the official repos or `archiso-git` from the AUR
2. `$ 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
3. `$ sudo cp -r /usr/share/archiso/configs/releng/ ~/liveiso`
4. 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.

View File

@ -1,16 +0,0 @@
---
layout: post
title: Arch spin pt. 3 - packages.x86_64
description: Getting all the packages you currently have installed from the Arch repos installed to your Arch ISO
tags: arch-spin
cover: /assets/arch-spin/pt-3.png
date: 2018-08-18 16:52:42
---
# 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.
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).

View File

@ -1,24 +0,0 @@
---
layout: post
title: "Forecasting with a command"
tags: minimalism cli
cover: /assets/weather.png
description: "Using a single command to get the week's weather forecast"
date: 2018-12-14 21:41
---
We all love the CLI *(and if we don't, we should)* so wouldn't it be great if there was a tool to see your weather forecast with a single command? Ceda EI at <a href="https://webionite.com" target="_blank">webionite.com</a> has written a tool that uses the Dark Sky API to give you the forecast for a day or week, at your location, and in Celsius or Fahrenheit.
## Celsius
+ Weather for one week - `$ curl sky.webionite.com/location`
+ Weather for today - `$ curl sky.webionite.com/location/t`
## Fahrenheit
+ Weather for one week - `$ curl sky.webionite.com/f/location`
+ Weather for today - `$ curl sky.webionite.com/f/location/t`
A great way to make this faster and simpler is to put an alias in your shell's `rc` file. For bash, you can do that with:
```
echo "alias weather='curl sky.webionite.com/f/location'" >> ~/.bashrc
```
If you ever forget how to use the tool, just run `curl sky.webionite.com` and you'll be given instructions.
![screenshot of the output of the command. it shows two rows of four boxes with ascii art depicting rain, overcast clouds, and the sun obscured by clouds. it shows the temperature and the time of day. everything is coloured and looks very attractive.](/assets/weather.png)

View File

@ -1,33 +0,0 @@
---
layout: post
title: Removing your site from the Wayback Machine (Keybase)
subtitle: A quick and easy guide
description: Quick guide on removing and excluding your content from Archive.org's Wayback Machine with Keybase
tags: privacy sysadmin
cover: /assets/posts/archive.png
date: 2019-06-03 12:08 -0400
---
# 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.
# 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](/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.
# 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.
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](/feed.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 . . .
## 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.
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](/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!

View File

@ -1,62 +0,0 @@
---
layout: post
title: Removing your site from the Wayback Machine (GPG)
subtitle: A quick-ish and easy-ish guide
description: Quick-ish and easy-ish guide on removing and excluding your domain from Archive.org's Wayback Machine using GPG keys
tags: privacy sysadmin
cover: /assets/posts/archive.png
date: 2019-06-04 21:57 -0400
---
# Preface
If you simply want to remove your website and nothing else, read through the setup and verifying identities sections then continue from the [For domains you own](/blog/excluding-your-site-from-the-wayback-machine-keybase-only/#for-domains-you-own) section of the previous post. If you're wanting to address accounts/profiles on websites you don't own, read on.
In addition to dealing with the Wayback Machine, this article is also supposed to help you get started using GPG in every-day life for general security and privacy.
# Getting set up
## Installation & Generating Keys
First of all, you'll want to install GPG. The package on most distributions should be just be `gnupg`.
- Debian: `sudo apt install gnupg`
- Arch: `sudo pacman -S gnupg`
- Fedora: `sudo dnf install gnupg`
The next step is generating your key. While it will take a bit longer to generate, a stronger key will be more secure. Also make sure you read this excerpt from the `man` page as it contains a useful warning.
>**WARNINGS**
>
>Use a *good* password for your user account and a *good* passphrase to protect your secret key. This passphrase is the weakest part of the whole system. Programs to do dictionary attacks on your secret keyring are very easy to write and so you should protect your "~/.gnupg/" directory very well.
With that said, use `gpg --full-gen-key` to get started. Keep in mind that you don't actually have to use your real name or personal email address. If you *want* a personal key, go ahead and create one but you can also use a pseudonym and fake address if you'd like.
1. I would use the default (1) of "RSA and RSA".
2. Again, you can use default but I would recommend 4096 bits because it's much more secure. This does mean, however, that it will take longer to generate the key.
3. An expiry date is recommended but you don't necessarily have to set one.
4. You *don't* have to use your real name. You can use a pseudonym if you wish.
5. You *don't* have to use your personal email. You can use a pseudonymous one if you wish.
6. You don't need a comment
7. Confirm
8. Come up with a ***secure*** password or, even better, a pass*phrase*.
9. Move your mouse around a bit, type, something like that while it's generating the key.
## Email
I use [Thunderbird](https://www.thunderbird.net/) for email and there is a great addon for it called [Enigmail](https://enigmail.net/). It's quite easy to set up and use but there is a really annoying bug that you'll experience when replying in threaded mode. If you want to encrypt a reply, simply open the editor in a new window.
# Verifying Identities
In general, all you'll have to do is type something along the lines of:
> I am \<your-name-here\> and I own the following accounts:
> - Account 1 - \<link\>
> - Account 2 - \<link\>
> - Etc.
You'll save that in a text file, run `gpg --clearsign file.txt`, copy the output, then paste it wherever it needs to go, whether that's a blog, a GitHub gist, etc. With Twitter/Mastodon and their character limit, this won't quite work. The best solution there is probably to post a link to a gpg-signed message on your website that links back to the post.
Really, all you have to do is tie all of your accounts together in as close-knit a web as you can and sign with your GPG key wherever possible. Linking everything to everything else would definitely work but it should also be enough to link everything to a single document on your website (or a gist in GitHub etc.) that links back to all of those.
I'm probably not explaining very well so here's a diagram showing it.
![a diagram illustrating the text below](/assets/posts/archive-diagram.png)
Note that the email links to everything else but nothing links back to the email. It's the main document that's at the centre of it all. Make sure both it and the email are signed. If you toot, link to the toot in the main document. If you make a gist, link to the gist in the main document.
# Sending the email
Once you have all the groundwork laid out, you'll be ready to send the email; the address is [info@archive.org](mailto:info@archive.org). Explain what you would like done and link to the document requesting your domain exclusion first as that's the easiest to verify. In the next paragraph, I would explain a little bit about what you've set up with signing messages and creating the "Web of Verification" (lol). Under that, I would link to the posts asking for the accounts to be removed. Make sure those posts also link back to the main document. Be polite, say thank you, then send the email!

View File

@ -1,94 +0,0 @@
---
layout: post
title: Downloading courses from Linux Academy
subtitle: youtube-dl is a phenomenal tool
description: Using youtube-dl to pull Linux Academy courses for offline viewing
tags: cli training
date: 2019-10-19 01:35 -0400
cover: /assets/posts/youtube-dl.png
---
# 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/).
# Setup
* 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)
* Get some food
* Maybe a drink
* Sit back down in your chair
* Spin around a bit
* Read on
# Downloading
* Log into your account
* Pick the course you want
* 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)
* Click the video you want to start with
* Watch the network logs
* You'll see an entry that starts with `playlist` (screenshot below)
![](/assets/posts/linux-academy/scrot-2.png)
* Right click it
* Copy the URL
* Paste it after `youtube-dl` in a terminal:
```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!
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
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:
```bash
amolith@poseidon:~/Videos/Courses/Ansible - Playbooks Deep Dive $ tree
.
├── 01 - Course Overview
│   ├── 01 - About the Course.mp4
│   ├── 02 - About the Training Architect.mp4
│   ├── 03 - Course Features and Tools.mp4
│   ├── 04 - About Ansible Playbooks.mp4
│   └── 05 - Advanced Inventory Configuration.mp4
├── 02 - Playbook Basics
│   ├── 01 - Using YAML for Ansible Playbooks.mp4
│   ├── 02 - Creating an Ansible Play.mp4
│   ├── 03 - The ansible-playbook Command.mp4
│   └── 04 - Understanding Playbook Tasks.mp4
├── 03 - Essential Playbook Syntax
│   ├── 01 - Using Variables in Playbooks.mp4
│   ├── 02 - Working with Templates.mp4
│   ├── 03 - Using Ansible Facts.mp4
│   ├── 04 - Conditional Execution in Playbooks.mp4
│   ├── 05 - Using Loops in Ansible.mp4
│   └── 06 - Working with Handlers in Ansible.mp4
├── 04 - Advanced Playbook Syntax
│   ├── 01 - Executing Selective Parts of a Playbook.mp4
│   ├── 02 - Working with Sensitive Data Using Ansible Vault.mp4
│   ├── 03 - Error Handling in a Playbook: limit, ignore_errors, changed_when, and failed_when.mp4
│   ├── 04 - Error Handling in a Playbook: Block Groups and The Debug Module.mp4
│   ├── 05 - Asynchronous Tasks within a Playbook.mp4
│   ├── 06 - Delegating Playbook Execution with delegate_to and local_action.mp4
│   ├── 07 - Parallelism in Playbooks.mp4
│   ├── 08 - Using run_once.mp4
│   ├── 09 - Overview of Ansible Roles.mp4
│   └── 10 - Ansible Role Demo.mp4
└── 05 - Conclusion and Next Steps.mp4
4 directories, 26 files
amolith@poseidon:~/Videos/Courses/Ansible - Playbooks Deep Dive $
```