From 35f2ccc54a3c71125adff8de179a0483c9708dfb Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Fri, 8 Jan 2021 22:01:20 -0800 Subject: [PATCH 01/10] fix things which aren't tags --- posts/2021-01-08_kvm-usb-auto-passthrough.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2021-01-08_kvm-usb-auto-passthrough.yaml b/posts/2021-01-08_kvm-usb-auto-passthrough.yaml index 7c36ca7..bd1f99a 100644 --- a/posts/2021-01-08_kvm-usb-auto-passthrough.yaml +++ b/posts/2021-01-08_kvm-usb-auto-passthrough.yaml @@ -41,7 +41,7 @@ ACTION=="remove", \ ``` The VENDOR_ID and MODEL_ID can be found by running the `lsusb` command, which -shows this as "ID :", for example "ID 6b62:6869". +shows this as "ID vendor_id:model_id", for example "ID 6b62:6869". And of course, here's the script `/usr/local/bin/kvm-udev` which takes care of the auto-connecting. It takes two parameters, first either being "attach" or From 7fe385c919febcd2732fa5dd52d4989bb9dac9d8 Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Sun, 20 Feb 2022 08:32:28 -0800 Subject: [PATCH 02/10] add a link to the wiki --- templates/base.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/base.html b/templates/base.html index 7b3cb8f..9ee812e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -45,6 +45,11 @@ {% endif %} {% endfor %} +
  • + + Wiki + +
  • From 7ec1af8a5ea00d451479d0993aabc2774c3c13ee Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Mon, 25 Apr 2022 16:53:21 -0700 Subject: [PATCH 03/10] add rel=me to Mastodon link --- templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index 9ee812e..a105031 100644 --- a/templates/base.html +++ b/templates/base.html @@ -67,7 +67,7 @@
  • - + Mastodon From e0152e297035457edefe966d99713a7b696cc725 Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Mon, 11 Jul 2022 16:06:48 -0700 Subject: [PATCH 04/10] [post] cheating at wordle with grep (#9) * [post] cheating at wordle with grep * trim whitespace * touch up * break lines --- ...22-07-11_cheating_at_wordle_with_grep.yaml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 posts/2022-07-11_cheating_at_wordle_with_grep.yaml diff --git a/posts/2022-07-11_cheating_at_wordle_with_grep.yaml b/posts/2022-07-11_cheating_at_wordle_with_grep.yaml new file mode 100644 index 0000000..c2c13ae --- /dev/null +++ b/posts/2022-07-11_cheating_at_wordle_with_grep.yaml @@ -0,0 +1,56 @@ +date: 2022-07-11 +title: 'Cheating at Wordle with grep' +--- +I usually try to make a good effort at +[Wordle](https://www.nytimes.com/games/wordle/index.html), but sometimes I get +down to the last one or two chances and need some help. Instead of anything +fancy-pants, I usually turn to a dictionary file and my friend, `grep`. + +So, first thing's first, you need a dictionary file, which is just a file with +a bunch of words one-per-line. These are usually found in `/usr/share/dict`. I +happen to have `cracklib-small` on my machine so we'll use that. + +First, you'll want to get all the five-letter words out of the file. I use the +regex `^\w{5}$`, which is `^` for the start of the line, `\w` for an +alphanumeric character, `{5}` saying that there are 5 of them, and `$` for the +end of the line. The beginning and end of line markers are important, otherwise +you'll get words that contain 5 or more letters. + +``` +grep -E '^\w{5}$' /usr/share/dict/cracklib-small +``` + +At this point, I've already made some guesses and have a few letters in the +right spot, and some letters which are correct but in the wrong spot. We'll +bucket these into two `grep`s. + +For letters in the right spot, I stick those right into a regex. For example, +let's say I know the word starts with 'f' and 'a': + +``` +grep -E 'fa\w\w\w' +``` + +For the right letters in the wrong spot, I simply use the letter as the regex. +If I have multiple letters, I can chain those together by piping grep like so: + +``` +grep s | grep t +``` + +So chaining them all together: + +``` +$ grep -E '^\w{5}$' /usr/share/dict/cracklib-small \ + | grep -e 'fa\w\w\w' \ + | grep s | grep t +facts +fasts +fates +faust +``` + +You could eliminate words that have letters you've already eliminiated by +chaining `grep -v ` to the end, but I find that pretty cumbersome. +There's only a handful of possible words at this point, so I think it's easier +to just remove them in my head. From eda7c7943728788d55817808fe96df7104229feb Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Mon, 11 Jul 2022 16:36:57 -0700 Subject: [PATCH 05/10] add some tags --- posts/2022-07-11_cheating_at_wordle_with_grep.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/posts/2022-07-11_cheating_at_wordle_with_grep.yaml b/posts/2022-07-11_cheating_at_wordle_with_grep.yaml index c2c13ae..6405c21 100644 --- a/posts/2022-07-11_cheating_at_wordle_with_grep.yaml +++ b/posts/2022-07-11_cheating_at_wordle_with_grep.yaml @@ -1,5 +1,7 @@ date: 2022-07-11 title: 'Cheating at Wordle with grep' +tags: + - linux --- I usually try to make a good effort at [Wordle](https://www.nytimes.com/games/wordle/index.html), but sometimes I get From 50e00e8cd2b64661bbdc2ed3994667f6dead9f1b Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Mon, 11 Jul 2022 16:40:55 -0700 Subject: [PATCH 06/10] update about me page --- pages/about.yaml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pages/about.yaml b/pages/about.yaml index a4e92af..1a6ad7b 100644 --- a/pages/about.yaml +++ b/pages/about.yaml @@ -5,15 +5,14 @@ slug: about --- ![jawn](/media/img/nick.jpg) -By day I'm a Site Reliability Engineer on the Cluster Operations team at +By day I'm a Site Reliability Engineer on the Fleet Automation team at [Dropbox](https://dropbox.com), where I help provide the tools and services to -automate our datacenters, things such as server provisioning, serve repair -validation, asset management, etc. +automate our datacenters, things such as server provisioning, OS installation, +server repair validation, asset management, etc. Outside of work I'm usually found riding bikes (sometimes for long distances -carrying camping gear), wrenching on bikes, drinking too much coffee, drinking -not-too-much beer, brewing the former two, or writing code to support my -hobbies. +carrying camping gear), wrenching on bikes, playing around with ham radio, +drinking too much coffee, or writing code to support my hobbies. I'm a huge proponent of free open-source software and maintaining control of your data. From 11abc831107d6dbdd0119311aa140a50783e4d59 Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Fri, 31 May 2024 19:42:24 -0700 Subject: [PATCH 07/10] add tracking using Umami --- templates/base.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/base.html b/templates/base.html index a105031..5ff2002 100644 --- a/templates/base.html +++ b/templates/base.html @@ -16,6 +16,8 @@ + +
  • - -
  • - - - Twitter - -
  • From 3820726136eb059b044068ecb9dbc04b37aad75f Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Fri, 1 Aug 2025 07:55:40 -0700 Subject: [PATCH 09/10] remove more cruft --- pages/projects.yaml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pages/projects.yaml b/pages/projects.yaml index b6f869a..f57a582 100644 --- a/pages/projects.yaml +++ b/pages/projects.yaml @@ -43,11 +43,6 @@ Links: [Project page](/cpu-usage-meter/), [Linux source](/media/projects/cpu_met LEDs on the front of my computer case displaying the CPU load. -### Serial IR Receiver (2006) -Links: [Project page](/ir-receiver/) - -A simple serial-based LIRC-compatible IR reciever. - ### ServCheck (PHP) Links: [servCheck.tar.gz](/media/projects/servCheck.tar.gz) @@ -55,19 +50,3 @@ A simple service checker written in PHP. Attempts to open a socket with the configured hosts and ports, and outputs an HTML file showing which services are up and down. I originally wrote this for the TerminalUnix site to show what's working and what isn't. - -### TerminalUnix (PHP) -A PHP and MySQL driven site, functioning as a web front-end and community site for -the TerminalUnix server. I started it because I was sick of all of these Content -Management Systems having features that I didn't want. I sat down during Spring Break -of 2006 and coded a PHP login system, not knowing about the wonders of some of the PHP -features. Eventually I coded nice things in such as MySQL access (instead of a flat -text file), a user adminstration system, and even a news sytem. - -Unfortunately I don't plan on releasing the source code since it's a big hard-coded mess. - -### N-Queens solver (C++) -Links: [nqueens.tar.gz](/media/projects/nqueens.tar.gz) - -Another Data Structures homework assignment. This solves (brute-forces) the -[N-Queens Problem](https://www.google.com/search?q=n-queens+problem) using recursion and backtracking. From 7d3a51cdfd95951f3fea6bba14795264bbb5c21a Mon Sep 17 00:00:00 2001 From: Nick Pegg Date: Tue, 21 Oct 2025 15:55:29 -0700 Subject: [PATCH 10/10] update Mastodon link --- templates/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/base.html b/templates/base.html index 0f749fc..38c1074 100644 --- a/templates/base.html +++ b/templates/base.html @@ -69,7 +69,7 @@
  • - + Mastodon