Programming Leftovers
-
Leon Mika ☛ Photo Bucket Update: Exporting To Zip
I’ve went with lines of JSON file for the image metadata. I considered a CSV file briefly, but for optional fields like captions and custom properties, I didn’t like the idea of a lot of empty columns. Better to go with a format that’s a little more flexible, even if it does mean more text per line.
-
Jennifer Moore ☛ Losing the imitation game
AI cannot develop software for you, but that's not going to stop people from trying to make it happen anyway. And that is going to turn all of the easy software development problems into hard problems.
-
Barry Hess ☛ Rails Form Redirect Not Rendering HTML
The first step was to rediscover how to write browser tests. This is because my past self incessantly reminds me to find bugs once.
-
Dan Slimmon ☛ Clinical troubleshooting: diagnose any production issue, fast.
Over my career as an SRE, I’ve diagnosed thousands of production issues. When I’m lucky, I have enough information at hand, and enough expertise in the systems involved, to get to the bottom of the problem on my own. But very often I need to bring together a team.
Troubleshooting with a team unleashes enormous power. Problems that would have taken me days to solve as an individual might take only hours or minutes, thanks to the benefit of pooled knowledge.
However, collaborative troubleshooting also comes with dangers. Time and again, I’ve seen groups struggle to make progress on an investigation due to miscommunication, misalignment, and confusion. Among other difficulties, the fundamental common ground breakdown can have especially heinous consequences in this context.
-
Python
-
Louis-Philippe Véronneau: Acts of active procrastination: example of a silly Python script for Moodle
My brain is currently suffering from an overload caused by grading student assignments.
In search of a somewhat productive way to procrastinate, I thought I would share a small script I wrote sometime in 2023 to facilitate my grading
I use Moodle for all the classes I teach and students use it to hand me out their papers. When I'm ready to grade them, I download the ZIP archive Moodle provides containing all their PDF files and comment them using xournalpp and my Wacom tablet.
-
Wouter Groeneveld ☛ My Retro Desk/Gaming Setup in 2024
It’s been three years since the first desk setup post from 2021, and while a couple of things have changed, nothing major has. The preservationist in me wanted to post an update nonetheless, so here goes.
-
Seth Michael Larson ☛ Regex character “$” doesn't mean “end-of-string”
So if you're trying to match a string without a newline at the end, you can't only use $ in Python! My expectation was having multiline mode disabled wouldn't have had this newline-matching behavior, but that isn't the case.
-
-
Shell/Bash/Zsh/Ksh
-
Thorsten Ball ☛ How to Lose Control of your Shell
When zsh is run with -c and the last command in that passed command is a non-built-in, such as ls or env, then ZSH execes into that last process. Meaning: it doesn’t create a child process to run ls. No, instead it turns itself into that command. That means at the point in time when ls is run in zsh -c 'echo lol; ls' the zsh process is gone and turned into ls and there’s no one left to reset the foreground process group leader.
But when you run zsh -c '/usr/bin/env; echo lol', i.e.: first non-built-in, then built-in, then ZSH doesn’t disappear. It forks and execs /usr/bin/env and then executes the echo lol and, somewhere in there, cleans up the foreground process group leader.
-
-
Kernel Space
-
MaskRay ☛ A compact relocation format for ELF
ELF's design emphasizes natural size and alignment guidelines for its control structures. This principle, outlined in Proceedings of the Summer 1990 USENIX Conference, ELF: An Object File to Mitigate Mischievous Misoneism, promotes ease of random access for structures like program headers, section headers, and symbols.
-
[Repeat] Trail of Bits ☛ Out of the kernel, into the tokens
We’re digging up the archives of vulnerabilities that Trail of Bits has reported over the years. This post shares the story of two such issues: a denial-of-service (DoS) vulnerability hidden in JSON Web Tokens (JWTs), and an oversight in the Linux kernel that could enable circumvention of critical kernel security mechanisms (KASLR).
-
-
Standards/Consortia
-
Björn Wärmedal ☛ I Used to Think CSS Was Good
Firstly, people have become obsessed with styling rather than content. Yes, people still think content is important. Don't worry about that. But most no longer care about what their content is; only how it looks. What I mean by this is that semantic meaning has disappeared again and given way for things like this:
<div class="left-vertical green one-column no-spacing link-underline">
And that's just going back to font and style tags all over again. Wasn't this what CSS was supposed to solve for us?
-