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. 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. 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 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..6405c21 --- /dev/null +++ b/posts/2022-07-11_cheating_at_wordle_with_grep.yaml @@ -0,0 +1,58 @@ +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 +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. diff --git a/templates/base.html b/templates/base.html index 7b3cb8f..38c1074 100644 --- a/templates/base.html +++ b/templates/base.html @@ -16,6 +16,8 @@ + +