RSSAmplifier

Blog

.:. brainsik

Recent content on .:. brainsik

brainsik.netRSS feed ↗91 posts

Latest posts

Migrating Debian 13 to Systemd Networking

Part of the journey to a new Linux home server includes migrating from Docker to rootless Podman. After much smashing of head into wall, I found it’s a lot easier to make rootless containers do nice things 1 if the network is being managed by systemd instead of the older ifupdown ( /etc/network/interfaces ) system. 
 The process breaks down to: 
 
 Create systemd network config. 
…

Notes: Serving a Podman Container Via Tailscale

These are the notes I made while trying to understand how I can serve a Podman container to my Tailnet. This is part of the research I’m doing around migrating from my old home Linux server to a new one. 
 Update 2026-07-11: Added notes on how to use the TS_SERVE_CONFIG env var to configure tailscale serve. 
 Tailscale container 
 Start the Tailscale container: 
 mkdir '…

Using a local LLM to convert grep output to Caddy config

Today I ran into a great use case for a local LLM: converting grep output into config code. 
 While looking at some metrics for the various websites I run, I noticed this blog (brainsik.net) was suddenly sending 404s for very old URLs used when I was briefly hosted on Tumblr. Those URLs had a format like “/post/[long-number]/title-of-the-post”. IIRC, the long number was the actual…

Scraping Public Messages

Originally posted on Mastodon. 
 I have mixed feelings about this 404 Media article: A Brazilian team used Discord’s API to scrape 10% of its open servers . The reality of public digital spaces is they are being recorded. Always. 
 This comes up on #Mastodon . Folks are (understandably) uncomfortable with their public posts forming a giant corpus. However, we are all posting to…

The LLM Journey Begins?

I’ve started playing with LLMs. Finally feeling it’s time to see what I can see for myself. I’ve been inspired by reading Simon Willison ’s blog – also the inspiration for getting these thoughts out of my skull and into a blog I can reference later. 
 
 
 
 Why now? 
 A problem to solve 
 The tooling 
 The experiment 
 Compared to using an online LLM 
 The…

Successfully Migrating to Caddy from Nginx

Last week I migrated the various web sites I host 1 from Nginx to Caddy . I could nerd on about how this finally lets me offer HTTP/3 2 and means I’m using a daemon written in a memory safe language , but mostly it’s config language is different enough from Apache and Nginx I’ve been intrigued to try it. 
 TLS 
 On the old server, I was using Let’s Encrypt ’s…

GPG Key Transition 2022

Doing end-of-the-year security housekeeping and figured it was time to generate a new GPG key with modern defaults. After looking into the model of a main key stored offline (like in a firesafe) and only using subkeys locally, I decided it wasn’t worth the effort. The reality is I almost only use these for signing GitHub commits. 🤷 
 The cypherpunk fever dreams of key signing parties…

The problem with moving phones from copper to fiber: power


 If you can’t contact your loved ones, or government agencies and relief
organizations can’t coordinate, you can’t get anything done. […] A
communications system is only useful if you can connect to every other
endpoint on the network. If you have power but no one else does, you have a
well powered and expensive paperweight (assuming you still have paper).…

The Secret Government Rulebook For Labeling You a Terrorist

A secret process that requires neither “concrete facts” nor “irrefutable evidence” … 
 
 “Instead of a watchlist limited to actual, known terrorists, the government has
built a vast system based on the unproven and flawed premise that it can
predict if a person will commit a terrorist act in the future,” says Hina
Shamsi, the head of the ACLU’s National Security Project. “On…

virtualenv-burrito 2.7

Yesterday, virtualenv-burrito 2.7 was released. There are two significant changes: 
 
 All Python packages in the .venvburrito directory are now inside a versioned site-packages directory. For example, if you are running Python 2.7 during the install or upgrade, all packages will now live in lib/python2.7/site-packages . 
 The pip program is no longer user accessible (i.e., in the…

GPG Key Transition 2014

After 14 years, it’s time for a new GPG key adhering to modern standards.
You can find my transition statement here .
The full-text follows. 
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1,SHA512
 
 Wed, 02 Jul 2014 20:54:03 -0700
 
 I am transitioning GPG keys from an old 1024-bit DSA key to a new
 4096-bit RSA key. The old key will continue to be valid…

x.pose'd data


 x.pose is a wearable data-driven sculpture that exposes a person’s skin as a
real-time reflection of the data that the wearer is producing. 
 — x.pose – xuedi.chen 
 
 
 
 She decided to aggregate this data collected on her everyday, building a
mobile app to do the job using Node.js and PhoneGap. X.pose is the result of
those data points, which have been…

Python cron task – exit if already running

A simple way for Python cron tasks to exit if another process is currently
running. Does not use a pidfile. 
 import os 
 import subprocess 
 import shlex 
 
 
 def bail_if_another_is_running ():
 cmd = shlex . split( 'pgrep -u {} -f {} ' . format(os . getuid(), __file__ ))
 pids = subprocess . check_output(cmd) . strip() . split( ' \n ' )
 if len(pids) > 1…

Virtualenvs with different interpreters

Update 2011-09-27 : Turns out virtualenv and virtualenvwrapper support this out of the box. Most of what’s written below is horrifically complex compared to just using the -p switch when you make your virtualenv. You simply need to do this: 
 mkvirtualenv -p /path/to/some/python coolname
 That’ll create a new virtualenv called “coolname” that uses /path/to/some/python for…

Elasticfox Forever

Tired of (yet again) fixing the Elasticfox Firefox extension to work with the latest version of Mozilla Firefox, I finally just made one with an absurd maximum version defined . 
 
 
 
 You can easily create one yourself. Since xpi files are zip files, it’s something like: 
 
 mkdir tangerine; cd tangerine 
 unzip /path/to/elasticfox.xpi 
 edit install.rdf so…

SSH Agent Forwarding

This is part of the mini-series OpenSSH for Devs . 
 SSH agent forwarding let’s you lock down remote hosts while making them easier to access and use in automated ways. One co-worker succinctly describes agent forwarding as “the shit”. 
 Example 
 Securely connect to a remote host from a remote host without a password. 
 laptop:~$ ssh -A host1.example.com
 Linux host1…

SSH Config

This is part of the mini-series OpenSSH for Devs . 
 An SSH config let’s you set options you use often (e.g., the user to login as or the port to connect to) globally or per-host. It can save a lot of typing and helps make SSH Just Work. 
 Example 
 Instead of typing: 
 ssh -p734 teamaster@sencha.example.com
 
 You can type: 
 ssh sencha
 
 By having this…

OpenSSH for Devs

There have been many surprises as I’ve moved from Sysadmin to Coder. Some of them are a product of switching contexts: what was once “common knowledge” is now “tips & tricks” (and vice versa). One tool that has regularly come up is SSH. It can be painful to watch developers jump through unnecessary hoops (over and over again) in order to access remote hosts. 
 In that light, presented…

Brewer's CAP Theorem

Starting with the punk rock creation story,
 Brewer’s CAP Theorem 
discusses the fascinating, proven theorem that you can’t have all three of
consistency, availability, and partition-tolerance in a distributed system. 
 A very interesting follow-up is:
 A CAP Solution (Proving Brewer Wrong) .
It approaches the problem by dynamically guaranteeing different CAP…

Released Virtualenv Burrito 2

This Python breakfast just got tastier. A major update to the way Virtualenv Burrito works was released this weekend. There is now full support for extension points and a less hackish way of managing the packages 1 under the hood. 
 Already have Virtualenv Burrito installed? Run this: 
 virtualenv-burrito upgrade
 New to Virtualenv Burrito? Read about it or run this: 
 curl -sL…

Announcing Virtualenv Burrito

Over the weekend I finished 1 a tool called Virtualenv Burrito . It’s goal was to be a single command which would setup Virtualenv and Virtualenvwrapper so you could start hacking on Python projects as quickly as possible. As a bonus, it installs the virtualenv-burrito command which will upgrade those packages to the latest versions I’ve tested. 
 Virtualenv Burrito was inspired by…

Adam Simpson's 2011 BAFTA illustrations

See Adam Simpson’s 2011 BAFTA illustrations for the 5 Best Film nominees. 
 
 Also see his gorgeous BAFTA mask illustration 
used for the tickets. 
 


Latent Figure Protocol

Paul Vanoue’s Latent Figure Protocol 
“utilizes known sequences in online [DNA] databases to produce
‘planned’ images” of ☠ and ©.” Fantastic work! 


Bomb crater swimming pools

Bomb crater swimming pools 
 
 A trained civil engineer, he then turned the hole into a kidney-shaped
swimming pool, flourished with a fine biomorphic indentation. 
 


Carniverous furniture

Carniverous furniture 
 Disturbing and intriguing. 


Tools never die. Waddaya mean, never?

Tools never die. Waddaya mean, never? 


My neutrophils can kick your white blood cells' butt

My neutrophils can kick your white blood cells’ butt 


Autoinstall Ubuntu servers with a CD

Although it’s been a few years since I switched from full-time Sysadmin to full-time Coder, being in a startup means getting saddled with an opsy task now and again regardless of your “title”. 
 The problem: We bought a bunch of servers which need minimal OS, IP and a hostname before they’re racked. In otherwords, we want to drop them in a datacenter, turn them on, and leave…

Apple, Flash, and Bullshit


 On Jan 30, 2010, at 11:58 PM, Your Friend wrote: 
 
 Just a quick little snippet from an apple town hall that rings true to me — whenever [my wife]’s CPU goes crazy and starts overheating it’s because of a website w/ flash content… 
 
 As for Adobe, Jobs said they are lazy and Jobs blames Adobe for a buggy implementation of Flash on the Mac as one of the reasons…

EtherPad to Shut Down After Google Acquisition

Via Daring Fireball: EtherPad to Shut Down After Google Acquisition of Parent Company AppJet 
 Sad. I just discovered EtherPad and one of my favorite things is its ad-hoc nature. Want to start collaborating on a document right now? Just go to the site, start a new pad, and pass around the URL. You could even make up the URL path ahead of time! No account is required; it Just Works. 1 
…

When underdogs break the rules

How David Beats Goliath: When underdogs break the rules 
 This is a great article about how underdogs can win most of the time when they stray from the accepted rules of engagement. Applicable to just about anything. 


Tweenbots

I just learned about this project this morning. I like it! 
 http://www.tweenbots.com/ 
 (I guess this was a good candidate for my first twitter tweet.) 


This is the NYPD

More unnecessary force and an illegal arrest. Many officers in the NYPD continue to work out of control and above the law. 
 Check out their use of pepper spray and especially how they deal with a bystander yelling during last week’s New School building occupation . 
 If you were living under a rock last year, here is the video of a bicyclist being thrown from his bike that got…

Stewart Brand on Gavin Newsom's sustainable cities talk

San Francisco Mayor Gavin Newsom gave a seminar for The Long Now Foundation entitled “Cities and Time”. If you live in San Francisco or are interested in Cities going “Green”, check out Stewart Brand ‘s summary of the talk: Mayor Gavin Newsom, “Cities and Time” . 
 It’s interesting to read about some of the things the mayor would like to see happen in San Francisco. Of course, he…

Why Reddit uses Python

During Steve Huffman’s and Alexis Ohanian’s Pycon Keynote , someone asked why Reddit was moved from Lisp to Python . The reason for moving wasn’t too interesting, but why they have stayed is. Steve gave two “huge” reasons Reddit continues to use Python: 
 
 The biggest thing that has kept us on Python … well, there are two huge things. One are the libraries. There’s…

WordPress SSL redirect failure

I have had so many problems managing the wordpress software , it’s ridiculous. If I could find a decent replacement, I’d move everyone over, but this appears to be the best out there. It reminds me of the time when all web browsers sucked and all email clients sucked. The sad thing is, WordPress used to be really solid; now every new version feels a bit more degraded than the last.…

Forbidden Twitter

On most sites I visit, error pages are infrequent. On Twitter, problems are so common the error pages have their own cultural currency . Sadly, I still regularly hit errors without such soothing imagery: 
 
 
 


Flexicommunity of web frameworks

The group I work with has thought about using Django a few times, but our biggest concern has been the lock-in you get with their base components. We’re already happy using SQLAlchemy and Genshi for a system application in our project. Besides liking the tools we’ve picked, we’d like to avoid using multiple tools for the same task. On the other hand, if a second set of tools…

What real revolutions are like

Clay Shirky has an incredible article about the Newspaper industry failing to come to terms with its own demise . Gems of wisdom abound throughout, but I found this particularly striking: 
 
 That is what real revolutions are like. The old stuff gets broken faster than the new stuff is put in its place. The importance of any given experiment isn’t apparent at the moment it appears; big…

Off-hours innovation

Zed Shaw’s NYC VCs Can’t Do Math poses a theory on why California has so many tech startups: 
 
 There are several reasons why technology just doesn’t take off [in NYC] the way it does in Silicon Valley. The primary reason in my mind is that California has laws that protect employees from their employers stealing off-hours work. In California, tech workers have no problem…

600531w




Techcrunch quality

Perhaps Last.fm ’s recent revelation will elighten more people to a longstanding reality about the tabloid Techcrunch: 
 
 Techcrunch are full of shit 
 
 On a whim, I decided to look up shitcrunch.com and found a blog that was created (but never used) in November 2007. It’s been crap for longer than that . 
 Last.fm, however, is a fantastic service. I’ve been…

BASH puzzle

Although only 1½ people read this blog, I’m hoping I’ll get some responses to this puzzle. I figured out a solution, but I’m worried i was being too clever and that there’s an even simpler BASH way of handling this. 
 You receive a string of argument pairs like: 
 ARGSTRING = 'a1 a2 b1 b2 c1 c2 …' 
 You don’t know how long the ARGSTRING will be ahead of…

Back at the old Harris Ranch …

A good, week-long, winter respite at the old Sonoma house … 
 
 
 
 Brandon also put a couple of images on his blog . 


Patch: Ubuntu DRBD now can haz run after boot

Ubuntu server edition “brings the power of inexpensive shared storage to your servers”. In particular, they tout DRBD support . Unfortunately, in Ubuntu 8.10 Intrepid Ibex, DRBD won’t start at boot . 
 The bug wasn’t too hard to track down. The problem is the update-rc.d script (run in the package postinst) is parsing the LSB headers in the DRBD init.d script. The LSB headers tell…

Halloween Critical Mass

This year’s Halloween Critical Mass was as awesome as always. A few thousand (my guess) people showed up in costumes and lights and (of course) political motifs. After many rides over many years in San Francisco, and a few scary, but important, rides in Manhattan, the SF Halloween Mass is one event I’ll keep showing up to year after year. In fact, it sounds like this year it was the…

A way to STOP text message spam

If you are being text spammed by a short-code (a mobile number typically 5 digits long), just reply with “STOP”. This should work if it’s a service that cares to not piss off its recipients. This probably won’t work for an annoying relative. In my case, spam was coming from a service called Kadoink, and after I sent “STOP”, I got back a text that said I’d receive no more…

CA Prop 8 invokes Hitler?!

How they dare to bring Hitler into the mix is beyond me. As if gay marriage could possibly, in any way, be put on par with what Hitler brought to the world. It’s totally insane and made me donate 4x my previous amount to Vote No on Prop 8 . Please donate (and of course vote NO, if you can)! 
 I originally donated thanks to a post made by A Coder Who Says Py . He reminded me how important…

Friday links: flash vorbis, appstore shackles, python 2.6

A few things I found particularly interesting this week: 
 
 Flash Vorbis player – An open source vorbis player in a 46KB SWF file! 
 Engadget Cares: Save us from Apple’s groundbreaking, developer-shackling App Store 
 Python 2.6 – Finally released with a ton of 3.0 features and the new -3 switch. Should be fun. 
 


NAT-PMP port mapper utility and framework

Sometimes I want to make a port on my home network (airport and OS X laptop) accessible to the world. However, using airport utility to setup the mapping and restart the router is annoying, especially when I know you can just map the port with some UDP packets . 
 A little searching around revealed Port Map . It’s The Coding Monkey ‘s very nice and simple GUI wrapped around their real…