<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Scott Leggett on @smlx's blog</title><link>https://smlx.dev/</link><description>Recent content in Scott Leggett on @smlx's blog</description><generator>Hugo</generator><language>en-au</language><managingEditor>scott@smlx.dev (Scott Leggett)</managingEditor><webMaster>scott@smlx.dev (Scott Leggett)</webMaster><copyright>all content [CC BY-SA](https://creativecommons.org/licenses/by-sa/4.0/), built with [Hugo](https://gohugo.io)</copyright><lastBuildDate>Mon, 10 Aug 2026 17:32:28 +0800</lastBuildDate><atom:link href="https://smlx.dev/index.xml" rel="self" type="application/rss+xml"/><item><title>OpenAI / Hugging Face hack</title><link>https://smlx.dev/posts/openai-huggingface/</link><pubDate>Mon, 10 Aug 2026 17:32:28 +0800</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/openai-huggingface/</guid><description>&lt;p&gt;I think this Hugging Face / OpenAI &amp;ldquo;model sandbox escape&amp;rdquo; drama is overhyped but not for the reasons I&amp;rsquo;ve seen written up in many places.
And I think that we are still stuck on OpenAI&amp;rsquo;s preferred framing, which is that their model has scary capabilities that allowed it to escape a secure sandbox.&lt;/p&gt;
&lt;p&gt;Yes, this hack was objectively impressive.
The exploit development, pivoting, and privilege escalation was quality work.
See &lt;a href="https://simonwillison.net/2026/Aug/7/openai-timeline/"&gt;Simon Willison&amp;rsquo;s write up for details&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Book Review: A Philosophy of Software Design by John Ousterhout</title><link>https://smlx.dev/posts/book-review-ousterhout-philosophy-software-design/</link><pubDate>Thu, 13 Jun 2024 23:40:10 +0800</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/book-review-ousterhout-philosophy-software-design/</guid><description>&lt;h2 id="introduction"&gt;
&lt;a href="#introduction"&gt;##&lt;/a&gt;
Introduction
&lt;/h2&gt;
&lt;p&gt;I picked up this book after reading an interesting &lt;a href="https://liw.fi/40/"&gt;blog post&lt;/a&gt; that mentioned it in passing.
Given Lars&amp;rsquo; recommendation I knew the book would be good.&lt;/p&gt;
&lt;p&gt;I usually don&amp;rsquo;t have much time for reading and this book sat on my desk for a week or so before I caught COVID again and suddenly found myself with time to kill while otherwise lying on the couch feeling very average.&lt;/p&gt;</description></item><item><title>Reverse-engineering an encrypted IoT protocol</title><link>https://smlx.dev/posts/goodwe-sems-protocol-teardown/</link><pubDate>Thu, 15 Feb 2024 00:04:52 +0800</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/goodwe-sems-protocol-teardown/</guid><description>&lt;h2 id="tldr"&gt;
&lt;a href="#tldr"&gt;##&lt;/a&gt;
TL;DR
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I reverse-engineered the encrypted protocol &lt;a href="https://www.goodwe.com.au/"&gt;GoodWe&lt;/a&gt; smart meters and solar inverters use to send metrics to the cloud.&lt;/li&gt;
&lt;li&gt;I used this research to build a &lt;a href="https://github.com/smlx/goodwe-exporters"&gt;prometheus exporter&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="the-sun-so-hot-right-now"&gt;
&lt;a href="#the-sun-so-hot-right-now"&gt;##&lt;/a&gt;
The Sun: so hot right now
&lt;/h2&gt;
&lt;p&gt;I got a solar &lt;abbr title="Photovoltaic"&gt;PV&lt;/abbr&gt; system installed in my house in mid 2023.
I did the bare minimum of research beforehand - just talked to a couple of different installers about pricing, sizing and the economics of a battery.&lt;/p&gt;</description></item><item><title>Recovering a BTRFS pool after drive failure</title><link>https://smlx.dev/posts/recovering-a-btrfs-pool-after-drive-failure/</link><pubDate>Sat, 16 Dec 2023 21:01:13 +0800</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/recovering-a-btrfs-pool-after-drive-failure/</guid><description>&lt;h2 id="my-nas"&gt;
&lt;a href="#my-nas"&gt;##&lt;/a&gt;
My NAS
&lt;/h2&gt;
&lt;p&gt;My &lt;abbr title="Network Attached Storage"&gt;NAS&lt;/abbr&gt; is cobbled together from an old workstation and a bunch of drives cannibalised from other machines over the years.
Not only are the drives second-hand, consumer grade, and of varying ages and brands, but they are also all different sizes - ranging from 250 GB up to 2 TB in size.
Any competent sysadmin would take one look and run away screaming, but it has held up surprisingly well for years.&lt;/p&gt;</description></item><item><title>Kubernetes Node Setup Jobs aka Run-Once Daemonsets</title><link>https://smlx.dev/posts/kubernetes-run-pod-once-per-node/</link><pubDate>Sat, 19 Nov 2022 20:24:39 +0800</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/kubernetes-run-pod-once-per-node/</guid><description>&lt;h2 id="managed-kubernetes-restrictions"&gt;
&lt;a href="#managed-kubernetes-restrictions"&gt;##&lt;/a&gt;
Managed Kubernetes restrictions
&lt;/h2&gt;
&lt;p&gt;Managed Kubernetes takes a huge operational burden off your shoulders.
You can have perfectly elastic infrastructure where nodes scale in and out of your cluster as workload requirements change.
It&amp;rsquo;s convenient, but it does come with limitations.&lt;/p&gt;
&lt;p&gt;One I ran into recently is running setup commands on the nodes in your cluster when they start.&lt;/p&gt;
&lt;p&gt;For example, what if you need to configure a kernel parameter on your nodes for one of your workloads?
Upstream Kubernetes has a &lt;a href="https://kubernetes.io/docs/tasks/administer-cluster/sysctl-cluster/#enabling-unsafe-sysctls"&gt;short list of &amp;ldquo;safe&amp;rdquo; sysctls&lt;/a&gt;, and some managed clouds &lt;a href="https://cloud.google.com/kubernetes-engine/docs/how-to/node-system-config#editing_a_node_system_configuration"&gt;expand that list slightly&lt;/a&gt;.
But if the sysctl you want to configure is not in that list it doesn&amp;rsquo;t seem possible to configure it using the provided managed Kubernetes interface.&lt;/p&gt;</description></item><item><title>Cheating at Wordle using grep</title><link>https://smlx.dev/posts/cheating-at-wordle-using-grep/</link><pubDate>Sat, 22 Oct 2022 21:34:06 +0800</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/cheating-at-wordle-using-grep/</guid><description>&lt;h2 id="motivation"&gt;
&lt;a href="#motivation"&gt;##&lt;/a&gt;
Motivation
&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.nytimes.com/games/wordle/index.html"&gt;Wordle&lt;/a&gt; is a puzzle intended to exercise your vocabulary and logical reasoning skills.
But what if you just want to procrastinate by writing some simple regular expressions?
Read on to find out how!&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;
&lt;a href="#prerequisites"&gt;##&lt;/a&gt;
Prerequisites
&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;A word list matching the language of the puzzle is required.
On Debian you will probably have a symlink at &lt;code&gt;/etc/dictionaries-common/words&lt;/code&gt; pointing to a suitable list.
If not, &lt;code&gt;apt install wamerican&lt;/code&gt; or similar.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html"&gt;&lt;code&gt;grep&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="encoding-the-puzzle"&gt;
&lt;a href="#encoding-the-puzzle"&gt;##&lt;/a&gt;
Encoding the puzzle
&lt;/h2&gt;
&lt;p&gt;Every time you guess a word, the letters are colour-coded by the puzzle to provide information about the solution.
This information can be encoded as regular expressions to find the solution - often within two or three guesses, and almost always within four.&lt;/p&gt;</description></item><item><title>UDP tee</title><link>https://smlx.dev/posts/udp-tee/</link><pubDate>Sun, 02 Oct 2022 16:55:28 +0800</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/udp-tee/</guid><description>&lt;h2 id="the-problem"&gt;
&lt;a href="#the-problem"&gt;##&lt;/a&gt;
The problem
&lt;/h2&gt;
&lt;p&gt;I had to migrate an old logging system to a new logging system, where one logging source was emitting &lt;a href="https://www.rfc-editor.org/rfc/rfc5426.html"&gt;syslog over &lt;!-- raw HTML omitted --&gt;UDP&lt;!-- raw HTML omitted --&gt;&lt;/a&gt;.
During the migration we needed to keep the old system in place, and in parallel set up new system for validation and &lt;!-- raw HTML omitted --&gt;UAT&lt;!-- raw HTML omitted --&gt; before finally cutting over.
The simplest solution I could think up was to duplicate the &lt;!-- raw HTML omitted --&gt;UDP&lt;!-- raw HTML omitted --&gt; syslog packets, and send them to both logging systems simultaneously.
In other words, &amp;ldquo;&lt;!-- raw HTML omitted --&gt;UDP&lt;!-- raw HTML omitted --&gt; &lt;a href="https://pubs.opengroup.org/onlinepubs/9699919799/utilities/tee.html"&gt;tee&lt;/a&gt;&amp;rdquo;.&lt;/p&gt;</description></item><item><title>Avoid kubectl's global state</title><link>https://smlx.dev/posts/kubectl-global-state/</link><pubDate>Sun, 28 Jun 2020 13:02:59 +0800</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/kubectl-global-state/</guid><description>&lt;h2 id="the-problem"&gt;
&lt;a href="#the-problem"&gt;##&lt;/a&gt;
The problem
&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://kubernetes.io/docs/reference/kubectl/overview/"&gt;&lt;code&gt;kubectl&lt;/code&gt;&lt;/a&gt; is the new, cloud-native &lt;a href="https://en.wikipedia.org/wiki/Secure_Shell"&gt;&lt;code&gt;ssh&lt;/code&gt;&lt;/a&gt;. That is, it&amp;rsquo;s the low-level tool to break out when you need to manually inspect or manipulate the state of your running applications.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ssh&lt;/code&gt; makes it easy to pop open a few virtual terminal windows to perform different tasks on several systems at once. Each virtual terminal window and its &lt;a href="https://en.wikipedia.org/wiki/Pseudoterminal"&gt;PTY&lt;/a&gt; encapsulates its own running state. There&amp;rsquo;s no way that &lt;code&gt;cd&lt;/code&gt;-ing into a directory in one window affects the current working directory in another window.&lt;/p&gt;</description></item><item><title>Dahua NVR DAV files</title><link>https://smlx.dev/posts/dahua-pvr-files/</link><pubDate>Tue, 24 Apr 2018 21:31:37 +1000</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/posts/dahua-pvr-files/</guid><description>&lt;p&gt;Dahua are a &lt;a href="https://en.wikipedia.org/wiki/White-label_product"&gt;white-label&lt;/a&gt; &lt;a href="https://en.wikipedia.org/wiki/Original_equipment_manufacturer"&gt;OEM&lt;/a&gt; who are &lt;a href="http://tanidvr.sourceforge.net/"&gt;apparently&lt;/a&gt; responsible for many common models of IP camera and Network Video Recorder (NVR) systems.
Files exported from such a system have a &lt;code&gt;.dav&lt;/code&gt; extension and a header identifying the manufacturer:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ hexdump -Cn 1024 NVR_ch1_main_20180416.dav
00000000 44 41 48 55 41 22 05 00 25 5c 21 49 da 60 21 49 |DAHUA&amp;quot;..%\!I.`!I|
00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000020 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000400
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;These files &lt;a href="https://dahuawiki.com/NVR/Playback/Convert_DAV"&gt;seem to be&lt;/a&gt; some proprietary format containing multiple &lt;a href="https://en.wikipedia.org/wiki/H.264/MPEG-4_AVC"&gt;H.264&lt;/a&gt; streams concatenated with framing and other data data.
If the streams are from different cameras, they can also be different resolutions.&lt;/p&gt;</description></item><item><title>About</title><link>https://smlx.dev/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><author>scott@smlx.dev (Scott Leggett)</author><guid>https://smlx.dev/about/</guid><description>&lt;h2 id="me"&gt;
&lt;a href="#me"&gt;##&lt;/a&gt;
Me
&lt;/h2&gt;
&lt;p&gt;Hi, I&amp;rsquo;m Scott, and I currently live in Western Australia.&lt;/p&gt;
&lt;p&gt;I blog about software, cloud, infosec, and miscellaneous other stuff.&lt;/p&gt;
&lt;h3 id="contact"&gt;
&lt;a href="#contact"&gt;###&lt;/a&gt;
Contact
&lt;/h3&gt;
&lt;p&gt;I have a &lt;a href="https://github.com/smlx"&gt;Github&lt;/a&gt; account, or you can contact me via &lt;a href="mailto:scott@smlx.dev"&gt;Email&lt;/a&gt; or &lt;a href="https://fosstodon.org/@smlx"&gt;Mastodon&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>