removed migrated notes

This commit is contained in:
2024-04-24 15:54:04 -04:00
parent f6ffce9b5d
commit 52c8bc2835
8 changed files with 0 additions and 165 deletions

View File

@@ -1,7 +0,0 @@
# Termpad - pipe to curl
If you don't have [httpie](https://httpie.io/) installed and have to rely on `curl` to post data to [termpad](https://github.com/SpyrosRoum/termpad):
```bash
history | tail -100 | curl --data-binary @- termpad.example.com
```

View File

@@ -1,60 +0,0 @@
My long, winding path to Markdown notes nirvana
For years, Ive been looking for a cross-platform markdown editor. There are several good ones out there, but several are not free, or theyve got built-in workflows that I would need to either adapt or fight against.
For the last several years, my notes have consisted of a single directory of markdown files.
At home, I sync these files to various machines with [Nextcloud](https://nextcloud.com/). What I wanted was a way to manage them and perhaps link amongst them (almost like a [wiki](https://www.dokuwiki.org/dokuwiki), which I used previously, but again found myself fighting with different implementations of Markdown and note portability).
After settling on [Typora](https://typora.io/) for a long time, I found it to be an excellent Markdown editor, and it handled my single directory of files well with a built-in file explorer.
After a few months I received a suggestion from a friend at work to look into [Obsidian](https://obsidian.md/). Obsidian quickly became my favorite editor. Its free, robust and has a large community.
There are tons of themes and plug-ins, and I was able to create links between notes and insert images with ease. The table plugin is a dream for anyone who messes with Markdown tables. Its also cross-platform, and I was able to access and update my notes from both my home Linux machines and my Windows work laptop.
Obsidian has a pretty fast release schedule, and they are always adding new, exciting features. In July 2021 Obsidian dropped their mobile app. Now, I have always accessed my notes via the [Nextcloud Notes](https://play.google.com/store/apps/details?id=it.niedermann.owncloud.notes&hl=en_US&gl=US) app,  but I was aware that the app is a bare-bones editor that is good for quick edits or reading, but not for actually creating or managing notes. I thought the Obsidian mobile app might be the solution to finally having full access to my notes everywhere I went!
Unfortunately, note syncing within the Obsidian app was only available (at the time) via a proprietary (paid) file-sync or some kind of roll-your-own (but not any of the big cloud providers like Google Drive, OneDrive or Nextcloud.)
At this point I started thinking about the dangers of locking myself into a single system from which I may never escape. Portability and the ability to use my own (preferably open-source) tools to manage my notes is the reason I never seriously considered options like OneNote or EverNote.
While I continued to use Obsidian without the mobile app, I started considering the possibility of an alternative.
The entire time I was using Obsidian, I was also trying to wrap my head around using [VS Code](https://code.visualstudio.com/) for system administration. VS Code is an open-source, cross-platform editor for programmers. It also has a huge, rich ecosystem of plug-ins and support. But I am not a programmer. Apart from a series of convoluted shell scripts and some random HTML, I was trying to use VS Code to manage git repositories on multiple machines while writing Ansible scripts to automate administration tasks.
So one day I took a deep dive into the vast extension collection and found some ways to manage Markdown in VS Code. Then I found a spell-check extension. I figured out the basics of workspaces and opened up my directory of notes. Hey! I am able to edit and manage my notes from VS Code! But there were a lot of features missing. This was not going to replace Obsidian. But it was nice to have an option.
After swapping back and forth between Obsidian and VS Code, one day I found this article: [Suping Up VS Code as a Markdown Notebook](https://kortina.nyc/essays/suping-up-vs-code-as-a-markdown-notebook/#note-navigation-with-wiki-links-and-tags-using-my-vs-code-markdown-notes-extension). He had managed to come very close to my use case, taking notes exclusively in VS Code, and had incorporated most of the features I missed most from Obsidian!
So I began figuring out how to duplicate my most-wanted note features in VS Code.
Since July 2021, I have been using VS Code exclusively to create and manage my notes. I still use the Nextcloud Notes app for mobile access, but thats never been a big problem and the app keeps getting updated, so you never know when it might get more features!
## VS Code Markdown Notes
**TL;DR: Just tell me what to install!**
If you just want to have a nice editor for markdown notes, these extensions should get you there. My modifications to default settings are included below the extension link.
### Extension List
* [code-spell-checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)
* [markdown-all-in-one](https://marketplace.visualstudio.com/items?itemName=yzhang.markdown-all-in-one)
* [markdown-extended](https://marketplace.visualstudio.com/items?itemName=jebbs.markdown-extended)
* [markdown-emoji](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-emoji)
* [markdown-to-confluence](https://marketplace.visualstudio.com/items?itemName=t-nano.markdown-to-confluence-vscode)
* [vscode-markdown-notes](https://marketplace.visualstudio.com/items?itemName=kortina.vscode-markdown-notes)
```
"vscodeMarkdownNotes.allowPipedWikiLinks": true,
"vscodeMarkdownNotes.compileSuggestionDetails": true,
"vscodeMarkdownNotes.slugifyCharacter": "NONE",
"vscodeMarkdownNotes.lowercaseNewNoteFilenames": false,
"vscodeMarkdownNotes.newNoteTemplate": "---\\ntitle: ${noteName}\\ntags: [ ]\\n---\\n\\n# ${noteName}\\n\\n## Summary",
"vscodeMarkdownNotes.noteCompletionConvention": "noExtension"
```
* [markdown-preview-enhanced](https://marketplace.visualstudio.com/items?itemName=shd101wyy.markdown-preview-enhanced)
```
"markdown-preview-enhanced.codeBlockTheme": "atom-material.css",
"markdown-preview-enhanced.previewTheme": "monokai.css"
```

View File

@@ -1,17 +0,0 @@
# Music cleanup one-liners
## Find albums with less than 3 tracks
Useful for finding directories that contain only artwork
```bash
NUM=3 && find /mnt/phnas02/music -maxdepth 2 -mindepth 2 -type f -printf '%h\0' | awk -v num="$NUM" 'BEGIN{RS="\0"} {array[$0]++} END{for (line in array) if (array[line]<num) printf "%s\n", line}'
```
## Beets find and remove albums
Delete album with:
```bash
beet rm -a "Jon Oliva" -d
```
(-a for album and -d to delete the files and not just the database entry)

View File

@@ -1,7 +0,0 @@
# View Apache requests per hour
```
grep "23/Jan" access.log | cut -d[ -f2 | cut -d] -f1 | awk -F: '{print $2":00"}' | sort -n | uniq -c
```
* [Reference](https://iceburn.medium.com/view-level-of-traffic-with-apache-access-log-65f9e3c30b1f)

View File

@@ -1,18 +0,0 @@
# Glow - CLI Markdown Renderer
```shell
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/charm.gpg
echo "deb [signed-by=/usr/share/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update
sudo apt install glow
```
Or copy/paste this one-liner
```shell
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/charm.gpg && echo "deb [signed-by=/usr/share/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list && sudo apt update && sudo apt install glow
```
---
* GitHub - [charmbracelet / glow](https://github.com/charmbracelet)

View File

@@ -1,36 +0,0 @@
# How to kill an unresponsive SSH session
## Summary
Lets say you're happily typing in your remote shell when all of sudden, the crappy Wi-Fi network you're using goes down.
You end up with a perfectly unusable frozen shell, ugh!
To do that, assuming you lost connectivity, press in that order:
```shell
[Enter]
~
.
```
That is, **return** key then **tilde** then **period**.
This will send an escape sequence to your local SSH client and terminate the connection.
So this will always work even without a network connection.
Here's the list of escape sequences:
Supported escape sequences:
`~.` - terminate connection (and any multiplexed sessions)
`~B` - send a BREAK to the remote system
`~C` - open a command line
`~R` - Request rekey (SSH protocol 2 only)
`~^Z` - suspend ssh
`~#` - list forwarded connections
`~&` - background ssh (when waiting for connections to terminate)
`~?` - this message
`~~` - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)

View File

@@ -1,7 +0,0 @@
# Motherboard Windows Key
A lot of Motherboards come with the Windows key too, you can just find it under Linux for a nice licensed VM.
```shell
sudo cat /sys/firmware/acpi/tables/MSDM
```

View File

@@ -1,13 +0,0 @@
# Almost line-speed file-copy using netcat
Receiving end:
```shell
nc -l -p 9999 | tar xvfp -
```
Sender:
```shell
tar cfp - /PATH/ | nc RECEIVER 9999
```