From 3b30684a5d9782113d04a44b9016b646b3981a83 Mon Sep 17 00:00:00 2001 From: James Brechtel Date: Wed, 2 Oct 2024 21:18:22 -0400 Subject: [PATCH] Updating posts - cleaning things up --- .gitignore | 5 +- aws-metric-filters.org | 1 - https-at-home.html | 243 -------------------------------------- https-at-home.org | 51 ++++++++ index.html | 212 --------------------------------- index.org | 12 +- job-description.org | 3 +- let-people-fail.html | 212 --------------------------------- let-people-fail.org | 29 ----- managing-expectations.org | 4 +- multi-room-audio.org | 46 ++++++++ setup.org | 2 + simple-css.org | 1 - vi-everywhere.org | 36 ++++++ 14 files changed, 148 insertions(+), 709 deletions(-) delete mode 100644 https-at-home.html create mode 100644 https-at-home.org delete mode 100644 index.html delete mode 100644 let-people-fail.html create mode 100644 multi-room-audio.org create mode 100644 vi-everywhere.org diff --git a/.gitignore b/.gitignore index ff64e02..d70ebaa 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1 @@ -public -resources/_gen -.hugo_build.lock -themes +public \ No newline at end of file diff --git a/aws-metric-filters.org b/aws-metric-filters.org index 737ef7e..b6f98c2 100644 --- a/aws-metric-filters.org +++ b/aws-metric-filters.org @@ -1,6 +1,5 @@ :PROPERTIES: #+SETUPFILE: setup.org -#+export_file_name: aws-cloudwatch-metric-filters #+subtitle: :END: ** Structed and passively collected metrics via AWS CloudWatch diff --git a/https-at-home.html b/https-at-home.html deleted file mode 100644 index ca135a7..0000000 --- a/https-at-home.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - -Just let people be wrong - - - - - - - -
-

Just let people be wrong -
- -

- -

-Warning: This, like most things, will involve a fair bit of projection. -

- -

-I have some thoughts about collaboration. -

- -

-While a lot of this is obvious and well accepted, I think there are some fine points worth elaborating on. -

- -

-The obvious part is that people work better together when they believe they are trusted. Trust breeds initiative and independence. Distrust breeds resentment and inaction. -

- -

-Consider the flip side of trust, for a moment. -

- -

-A common way that people show distrust when collaborating is either micromanaging or just coming in behind someone and redoing their work. -

- -

-If that demonstrates distrust then -

- -

-It's not enough that you simply do trust someone else to get the benefits, you need to show it. I think this is the part that many people skip or ignore. -

- -

-This is, of course, true in general. -

-
- - diff --git a/https-at-home.org b/https-at-home.org new file mode 100644 index 0000000..bc82bdc --- /dev/null +++ b/https-at-home.org @@ -0,0 +1,51 @@ +:PROPERTIES: +#+SETUPFILE: setup.org +#+keywords: homelab +#+subtitle: +:END: + +** HTTPS @ Home +I run a lot of services at home. + +This includes, but isn't limited to + +- [[https://archivebox.io/][ArchiveBox]] +- [[https://github.com/dani-garcia/vaultwarden][VaultWarden]] +- [[https://github.com/navidrome/navidrome][Navidrome]] +- [[https://plex.tv][Plex]] +- [[https://github.com/LibrePhotos/librephotos][LibrePhotos]] +- This blog + +and a lot more. + +Pretty much anything that's served up over HTTP is always nice if not +necessary to have behind TLS. + +[[https://letsencrypt.org/][LetsEncrypt]] long ago brought free certs to +the masses and there are a lot of tools for automating that nowadays. + +My preferred approach for getting all the unnecessary nonsense I +self-host at home behind TLS is [[https://caddyserver.com][Caddy]]. + +I have a super straight forward setup, generally: + +- Run Caddy in a docker container +- Create a wildcard CNAME record in my DNS pointing at my home's + (effectively) static IP +- Add an entry in my Caddyfile for each services I'm running at home on + its own subdomain +- If it's a service then I add it with a =reverse_proxy= block +- If it's a static site (like this) then there's a block for +- If it's something I want only accessible on my home network then I put + a block like + +#+BEGIN_EXAMPLE + @local_network { + path * + remote_ip + } +#+END_EXAMPLE + +in the directive. And voila. + +Then tell Caddy to reload the config and I'm done. diff --git a/index.html b/index.html deleted file mode 100644 index a75a3dc..0000000 --- a/index.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - -
- -
-

1. Posts

- -
-
- - diff --git a/index.org b/index.org index cf0b767..7eb6eb4 100644 --- a/index.org +++ b/index.org @@ -4,6 +4,12 @@ #+subtitle: :END: -* Posts -[[file:let-people-fail.org][Let people fail]] - +* [[file:let-people-fail.org][Let people fail]] +* [[file:job-description.org][My job description]] +* TODO [[file:managing-expectations.org][Managing Expectations]] +* [[file:https-at-home.org][HTTPS @ Homelab]] +* [[file:multi-room-audio.org][Multi-room audio setup]] +* [[file:vi-everywhere.org][vi-editing everywhere]] +* [[file:aws-metric-filters.org][AWS Cloudwatch Metric Filters]] +* [[file:simple-css.org][Simple CSS frameworks]] + diff --git a/job-description.org b/job-description.org index d651759..7715b32 100644 --- a/job-description.org +++ b/job-description.org @@ -1,7 +1,6 @@ :PROPERTIES: #+SETUPFILE: setup.org -#+export_file_name: job-description :END: -** My job description +** Just what is it I do here? For my own sake, I think it's clarifying for me ot describe just what my job is. diff --git a/let-people-fail.html b/let-people-fail.html deleted file mode 100644 index 717411f..0000000 --- a/let-people-fail.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - -
- -
-

1. Posts

- -
-
- - diff --git a/let-people-fail.org b/let-people-fail.org index f52c08f..d6b3b01 100644 --- a/let-people-fail.org +++ b/let-people-fail.org @@ -1,7 +1,6 @@ :PROPERTIES: #+SETUPFILE: setup.org #+keywords: advice relationships people -#+export_file_name: let-people-fail #+subtitle: :END: @@ -23,31 +22,3 @@ If that demonstrates distrust then It's not enough that you simply _do_ trust someone else to get the benefits, you need to show it. I think this is the part that many people skip or ignore. This is, of course, true in general. - -** Very simple CSS frameworks -:PROPERTIES: -#+keywords: CSS -#+export_file_name: css-frameworks -#+subtitle: -:END: - -*** Minimal CSS / fancy resets -I really like simple drop-in CSS resets like the one I use for this site. - -At the time of writing, I'm using [[https://picocss.com/][Pico]] but I also considered [[https://yegor256.github.io/tacit/][tacit]] - -The idea is that they provide nice default styling of HTML elements out of the box without the need to reference any specific classes. - -The idea works well for sites that are much more content than layout - like this one. - -Using tacit is a matter of incluing this link tag in the page's HEAD element: - -#+BEGIN_SRC html - -#+END_SRC - -#+BEGIN_SRC haskell - doThings :: String -> IO () - doThings name = do - putStrLn name -#+END_SRC diff --git a/managing-expectations.org b/managing-expectations.org index 39e98ff..91aa736 100644 --- a/managing-expectations.org +++ b/managing-expectations.org @@ -1,5 +1,5 @@ :PROPERTIES: #+SETUPFILE: setup.org -#+export_file_name: expectations :END: -* Managing expectations + +* Managing expectations! diff --git a/multi-room-audio.org b/multi-room-audio.org new file mode 100644 index 0000000..58d75a7 --- /dev/null +++ b/multi-room-audio.org @@ -0,0 +1,46 @@ +:PROPERTIES: +#+SETUPFILE: setup.org +#+keywords: homelab snapcast audio +#+subtitle: +:END: +** My multiroom audio setup + +I've put my home audio solution together out of the following +components. + +- [[https://github.com/badaix/snapcast][Snapcast]] + +- [[https://www.musicpd.org/][MPD]] + +- [[https://github.com/librespot-org/librespot][Librespot]] + +- [[https://github.com/mikebrady/shairport-sync][Shairport-sync]] + +- A mini-PC in my closet running the above software + +- Two Raspberry Pi 4s + +- Four Raspberry Pi Zero Ws + +- Some desktop speakers and some Bluetooth speakers (wired to the Pis) + +Each of the Raspberry Pis is in a room or porch attached to a speaker. + +Snapcast lets me take an audio source and synchronize it across multiple +clients. Each of the Raspberry Pis are running a =snapclient= instance +and play whatever the =snapserver= instance tells them to. + +Snapcast is setup to send whichever of the streams (MPD, Spotify, +Shairport-sync/AirPlay) is playing audio to each of the clients that are +connected to it. + +This lets me or anyone else on my WiFi network play directly on one or +more of the speakers - each named for the room that they're in using +either Spotify, AirPlay, picking from my own music collection or by +pointing at a URL (like to a podcast episode). + +This works out great and we've used it at home for the past year. + +I'd like to get the podcast experience to a more seamless place but it's +pretty OK right now using AirMusic on my phone to play audio to the +speakers over AirPlay. diff --git a/setup.org b/setup.org index 6d89155..85bbf1b 100644 --- a/setup.org +++ b/setup.org @@ -1,6 +1,7 @@ :PROPERTIES: #+author: James Brechtel #+email: me@jamesbrechtel.com +#+bind: org-export-publishing-directory "./public" #+html_head: #+html_head_holiday: #+html_head_mvp: @@ -10,5 +11,6 @@ #+options: html-preamble:t html-scripts:nil html-style:t #+options: html5-fancy:t tex:t #+options: author:t broken-links:mark c:nil creator:nil f:t tasks:t toc:nil todo:t +#+OPTIONS: num:nil #+language: en :END: diff --git a/simple-css.org b/simple-css.org index 7a74f7b..706534c 100644 --- a/simple-css.org +++ b/simple-css.org @@ -1,6 +1,5 @@ :PROPERTIES: #+SETUPFILE: setup.org -#+export_file_name: css-frameworks #+subtitle: :END: ** Very simple CSS frameworks diff --git a/vi-everywhere.org b/vi-everywhere.org new file mode 100644 index 0000000..bcbaa3a --- /dev/null +++ b/vi-everywhere.org @@ -0,0 +1,36 @@ +:PROPERTIES: +#+SETUPFILE: setup.org +#+keywords: vim +#+subtitle: +:END: +** vi modal editing in most places +For my sake, I prefer to have Vim bindings in as many places as +possible. + +Most shells can be configured to use Vim bindings by putting =set -o vi= +somewhere in your shell startup script. + +If you're using ZSH then you'll probably want an additional binding to +restore CTRL-R reverse history search. + +=bindkey '^R' history-incremental-search-backward= + +For CLI tools that use the =readline= library then you can configure its +input mode using a =.inputrc= file in your =$HOME= directory. + +This affects REPLs like =ghci= and tools like =psql=. + +#+begin_src txt +set editing-mode vi +$if mode=vi + +set keymap vi-command +# these are for vi-command mode +Control-l: clear-screen + +set keymap vi-insert +# these are for vi-insert mode +Control-l: clear-screen +$endif +#+end_src +