mnml.blog

Pretty Errors

I ran across a nice python package recently. Pretty_Errors formats python exception messages so that they are more legible. Installing it universally also enables the package to make syntax errors more legible. This is one of those packages that I wish I had years ago and I will automatically install for every project going forward.

python -m pip install pretty_errors
python -m pretty_errors 

Running these commands will install the package and then add it to your python startup procedure. If it is not setup universally then it must be imported into each project import pretty_errors. I prefer the universal method.

Webmention Playground

I need a place to test webmentions without spamming anyone. I created this post for that purpose. If you need an endpoint to test against you can use this page also.

Making Traditional French Butter

This video tickles all my fancies. We see chemistry and physics, craftsmanship, passion, mechanics, and a sheer love of work and life. Someone could make a full documentary a la “Jiro Dreams of Sushi” here and I would gladly watch it.

From the always excellent blog FYFD.

Double Screen Sharing

It’s possible to work remotely on a Mac by enabling screen sharing from the System Preferences/Sharing pane.

If you open screen sharing on one computer and then use that computer to screen share back to the original computer an interesting effect occurs.

Infinite Screens

Backing Up Raspberry Pi on MacOS

I’ve been fortunate to have never lost any data in my computing life. It is fortunate because it will happen. No matter how good your backup system is it will happen eventually. I have always been able to fall back on a second, third, or in some cases, forth copy of data. I use a lot of Raspberry Pis. They are all booting off of MicroSD cards. They are notorious for dying because the SD cards are not designed for significant read/write cycles. It is important to back them up. Even if you don’t save important information on them it will save you countless hours in setup time. It isn’t hard to do. Below are my steps on a Mac.

From terminal find the SD card.

>> diskutil list

You should have several devices (/dev/disk*) listed. Find the one that matches your SD card. Mine is /dev/disk2

Copy the SD card to your Mac.

>> sudo dd if=/dev/disk2 of=/users/name/backup-directory/backup-file.dmg

if is the input file. of is the output file. You can save this anywhere you like on your system. This can take several minutes to an hour depending on the size of the card. Don’t interrupt the process if it takes a long time. That is normal.

To restore to another SD, unarchive the file, run the same command, but reverse the input and output files.

>> sudo dd if=/users/name/backup-directory/backup-file.dmg of=/dev/disk2 

All my Pis use 32Gb drives. I don’t want a bunch of 32Gb files so I archive the backups in Finder after this process is completed.

I’m most concerned with backups for the systems that run my 3D printers. I run Octoprint and stream video on all my printers. I don’t want to go through the setup process if I lose a card. Last year I moved all these systems from Raspian to DietPi. DietPi is much smaller and allows for a RAMDisk with minimal logging. This is less taxing on the SD card. I have not lost an SD card since moving to DietPi.

Rivers of Information

I haven’t put much time into writing recently. I’ve pursued other projects. I was talking with my girlfriend and she noted that I’m posting a lot on Twitter. When I thought about why I posted there I realized that I have developed a nicely curated list of accounts that I follow and posting is almost frictionless. This is particularly true when I want to post a quick status update of a project that I’m working on.

The problem with this is that I’m neglecting my blog, my data store, my memories by placing them in someone else’s silo. I didn’t use social media accounts for years. I’ve come to realize that they can be useful places to meet people with similar hobbies and share ideas. I have met many thoughtful, talented people over Twitter and have found a lot of inspiration. I want to interact with those people and I cannot expect them to come to this site. Even if I put in comments or discussion features it is unreasonable. I probably have less than 50 followers.

Besides Twitter, I also spend a large part of my day reading and jotting down notes. I add links to my Safari reading list. I put ideas in notebooks. The vast majority of these will never be looked at again and most of my ideas will never see the light of day. It would be nice to put them on my blog so that they are easily searchable and so that others can see them and possibly draw inspiration. I have followed Dave Winer for years, decades even. I believe it was Dave that popularized the idea of information rivers. These are streams of links, news, quotes, etc. I was inspired by the idea and decided to create another section on my site that holds a river of random information.

I see the river as something like “stream of consciousness” blogging. It isn’t something to think about. It doesn’t require proofreading. It’s a never-ending post-it note. Earlier I said that I haven’t written much lately, but I have been thinking. If I capture those thoughts on my blog then there will be more here to think about and maybe help to occasionally brighten the proverbial light bulb. The main issue is eliminating friction and I think I have a workflow that reduces the friction sufficiently for me to use the river as my main collection of thought.

Along with the river I’m working to add IndieWeb functionality such as webmentions, websub, and webpub. The idea is to silo here and syndicate elsewhere. I’ve made some progress. You may see some odd formatting in a few of the first webmentions. I apologize in advance. It will get better.

This is Frisket

Frisket the cat

This is Frisket. That is Frisket, like brisket, but with an F. Frisket is a cat. She annoys me. She crawls inside my pants when I go to the restroom. She jumps in the shower with me every morning and scratches my legs while she scrambles to get out. She bites my ankles when I go up the stairs. She falls asleep in the pantry and then wakes up scared in the middle of online meetings. She licks my ears and wakes me up just when the dream was getting good. She once fell asleep on my laptop keyboard while I was watching TV and posted a random issue to Github. Note to self, turn off unlock with Apple Watch on the laptop.

I dislike Frisket. There are four people that love Frisket though. I love those four people very much. I don’t have to like Frisket, but I love her too.

Say Yes To Living

Every other Thursday I have a special evening with one of my kids. Tonight was with my youngest son. As always we had a great time. We grabbed an ice cream. We sat at the park and ate it, then we played at the playground. We went home and swam for an hour. He took off his swim vest tonight, jumped in and swam out for the first time! I was so proud. Then we ate a sandwich and he went home to his mom.

I was reflecting afterwards. He always has fun because he always says yes. He doesn’t care what we do. I love these nights also because I don’t care what the kids want to do. I just want to be with them. We need to say yes more and live. Life is too short for no.

Republican States are Expanding Their Power Over Elections

Several days ago, Nick Corasaniti and Reid J. Epstein of The New York Times published an article outlining several of the ways Republican controlled states are using to tilt upcoming elections in their favor.

But this year, Ms. Hollis will be removed from the board, the result of a local election law signed by Gov. Brian Kemp, a Republican. Previously, election board members were selected by both political parties, county commissioners and the three biggest municipalities in Troup County. Now, the G.O.P.-controlled county commission has the sole authority to restructure the board and appoint all the new members.

Partisan election boards.

G.O.P. lawmakers have also stripped secretaries of state of their power, asserted more control over state election boards, made it easier to overturn election results, and pursued several partisan audits and inspections of 2020 results.

Republicans have introduced at least 216 bills in 41 states to give legislatures more power over elections officials, according to the States United Democracy Center, a new bipartisan organization that aims to protect democratic norms. Of those, 24 have been enacted into law across 14 states.

Removing power from one branch of government to ensure partisan control.

Republicans in Arizona have introduced a bill that would largely strip Katie Hobbs, the Democratic secretary of state, of her authority over election lawsuits, and then expire when she leaves office. And they have introduced another bill that would give the Legislature more power over setting the guidelines for election administration, a major task currently carried out by the secretary of state.

In Arizona they are not even trying to hide their contempt for democracy by writing into law a time limit based on the term of a single person. And in Arkansas,

The author of the legislation, State Representative Mark Lowery, a Republican from a suburb of Little Rock, said it was necessary to remove election power from the local authorities, who in Pulaski County are Democrats, because otherwise Republicans could not get a fair shake.

“Without this legislation, the only entity you could have referred impropriety to is the prosecuting attorney, who is a Democrat, and possibly not had anything done,” Mr. Lowery said in an interview. “This gives another level of investigative authority to a board that is commissioned by the state to oversee elections.”

Asked about last year’s election, Mr. Lowery said, “I do believe Donald Trump was elected president.”

Of course he does, but this is not about Donald Trump. It’s about the changing demographics and values in America. There is an assault against political norms from the right because culture is shifting beneath them and against them. They don’t favor an equitable and just world. This is not about meritocracy. It is aristocracy. It is also dangerous. People fight when they are threatened, but they fight like hell when they are backed into a corner and don’t see any options. Many of the politicians espousing views like those above feel their way of life is being challenged. Unfortunately, there are very few compelling ideas coming from the political right currently.

I have strong faith in America, but I worry for us. We talk about threats to democracy, like terrorism, communism, or Russia, but democracy does not fail from without, it fails from within.

Apple Private Relay is Tor for Safari

Apple’s upcoming operating systems include a new feature in Safari, Private Relay. The functionality is essentially the same as onion routing which you may know from the Tor Project. Bruce Schneier has a nice overview on his site. Of note:

Not available in China, of course — and also Belarus, Colombia, Egypt, Kazakhstan, Saudi Arabia, South Africa, Turkmenistan, Uganda, and the Philippines.

I’m glad Apple is building this into Safari. It is a useful feature that will help anonymize your internet traffic. Remember that if you login to a website your anonymity goes away immediately. As a global enterprise Apple has to make compromises in certain parts of the world. If anonymity is important for your life or well-being or if you are simply privacy conscious and travel to the places listed above I still recommend using Tor.