https://github.com/bdd/runitor
... which lets you quickly integrate any cron job with the https://healthchecks.io service. So darn handy. And you're supporting an indie startup that regularly shows up on HN.
6,105 karma · joined October 5, 2007
Formerly the founding CTO of Parse.ly. Coding in: Python, JavaScript, Zig. Pleased to be a Pythonista and UNIX lover.
Parse.ly was acquired by Automattic (creators of WordPress.com) in February 2021; more here: https://www.techmeme.com/210208/p12#a210208p12
My essays & technical blog: https://amontalenti.com
My AngelList profile: https://angel.co/p/amontalenti
My occasional tweets: https://twitter.com/amontalenti
https://github.com/bdd/runitor
... which lets you quickly integrate any cron job with the https://healthchecks.io service. So darn handy. And you're supporting an indie startup that regularly shows up on HN.
"In 2005, Mr. Lapham wrote and appeared in 'The American Ruling Class,' a documentary-style film featuring fictional characters as well as interviews with real celebrities, including Bill Bradley, Walter Cronkite, Pete Seeger, Robert Altman and Barbara Ehrenreich."
Unfortunately as described it doesn't capture quite how unusual, innovative, and special this film is.
It's a "dramatic-documentary-musical." A mixture of dramatic filmmaking, documentary filmmaking, and even some elements of musical.
Its main topic/idea is to show two promising college students on graduation day, one pursuing a career of money and power (in high finance) and the other pursuing art (via writing). Lapham uses this lens to analyze all aspects of American society from a class and power direction. Mainly to show the draw of power and conformity for the college-educated elite, and the way a struggling working class subsidizes their ambitions with their labor.
In the film, Lapham himself is both a narrator and a principal, acting as a mentor to one of the two "characters," who are played by actors, but thrown into conversation with real people, including some people holding powerful positions, and some intellectual celebrities.
Ehrenreich, who had recently completed the book "Nickel and Dimed" (2001), in which she goes "undercover" as the working poor, has a role in the film, too. She "plays" the role of a worker at a restaurant, and she and the other workers, at one point, break out in song, a song titled "Nickel and Dimed." I read a review of this movie that called this scene "divine madness," and I agree.
This is one of a small collection of movies I have on DVD, because it's so small and interesting as a film, that I rewatch it from time to time. I sometimes struggle to find it on streaming networks or online. It acts as a little bit of a life decoder for me, since I grew up as a public school educated child of immigrants with not-that-much class awareness, graduated from a top college around the time the film was made, got recruited to work on Wall Street (much as the film portrays in its opening scenes), then left a Wall Street job after 3 years to co-found and work on a tech startup for many years.
Anyway, I was influenced by a lot of Lapham's work, especially his moral clarity in anti-war writing during the Iraq War years. But this one little film really stuck with me. RIP, Lewis Lapham.
I think of restic system backups covering something like losing a customized /etc file in an apt upgrade and wanting to get it back.
- encrypted, chunk-deduped, snapshotted backups
- single Go binary, so I could even backup the binary used to create my backups
- reasonable versioning and release scheme
- I could read, and understand, its design document: https://github.com/restic/restic/blob/master/doc/design.rst
I then just tried using it for a year and never hit any issues with it, so kept going, and now it's 6+ years later.
In my linked post above, I wrote about this:
"You might think btrfs and zfs snapshots would let you create a snapshot of your filesystem and then backup that rather than your current live filesystem state. That’s a good idea, but it’s still an open issue on restic for something like this to be built-in (link). There’s a proposal about how you could script it with ZFS in this nice article (link) on the snapshotting problem for backups."
The post contains the links with further information.
My imperfect personal workaround is to run the restic backup script from a virtual console (TTY) occasionally with my display server / login manager service stopped.
"My reasoning for splitting these two processes — restic backup and rclone sync — is that I run the local restic backup procedure more frequently than my offsite rclone sync cloud upload. So I’m OK with them being separate processes, and, what’s more, rclone offers a different set of handy options for either optimizing (or intentionally throttling) the cloud-based uploads to Backblaze B2."
https://amontalenti.com/2024/06/19/backups-restic-rclone
The tools I use on Linux for backup are restic + rclone, storing my restic repo on a speedy USB3 SSD. For offsite, I use rclone to incrementally upload the entire restic repository to Backblaze B2.
The net effect: I have something akin to Time Machine (macOS) or Arq (macOS + Windows), but on my Linux laptop, without needing to use ZFS or btrfs everywhere.
Using restic + some shell scripting, I get full support for de-duplicated, encrypted, snapshot-based backups across all my "simpler" source filesystems. Namely: across ext4, exFAT, and (occasionally) FAT32, which is where my data is usually stored. And pushing the whole restic repo offsite to cloud storage via rclone + Backblaze completes the "3-2-1" setup straightforwardly.
[1]: https://en.wikipedia.org/wiki/IBM_PC%E2%80%93compatible
So, "digital asset managers" (DAMs) are basically fancy versions of the WordPress media library:
https://wordpress.org/documentation/article/media-library-sc...
Why might a fancy version be needed? Well, the basic media library bundled with WordPress just uploads files directly into a web server directory, and then serves them from your web server using its static HTTP serving configuration (e.g. typically via Apache HTTP Server). The uploads are simple and 1:1, whatever you upload through the browser ends up on the web server as a file.
But usually, a media library could "do more" with those assets -- it could resize them, convert them to web-optimized assets (e.g. WebP), could create thumbnails and crops for different page layouts, could serve the content from a CDN. And that's just images, but there are other things you could do for PDFs (create a searchable index), MSOffice files (auto-convert to PDFs), or videos (extract thumbnails, re-encode in other resolutions, serve from video CDN or hosted video player service, like Wistia or Vimeo).
Of course, if you don't use WordPress, perhaps your CMS doesn't have a media library function at all, in which case a DAM might be even more helpful. This seems to be the case for a number of static site generators (SSGs), for example.
On a quick glance, it looks like Daminik is going after this with a separate open source project (written in PHP), and for its alpha is focusing on image management (using ImageMagick under the hood for image conversions). It also seems like it has built in support for uploading assets to Amazon S3, which would mean presumably you could very easily put the AWS CloudFront CDN on top.
(I run a personal WordPress site, and the way I personally handle this is to live with the built-in WP media library, but then put Cloudflare caching and CDN atop at the edge.)
Obama, being born in 1961, is on the edge of Boomers and Gen X, since generational boundaries are always a little poorly defined. He was 47 years old when elected to his first term in 2008, so we definitely think of him as a "young president." Plus, he was only a US senator for 3 years before winning the presidency. Bill Clinton, a definite boomer, was 46 when he was elected in 1992.
The first episode is free on YouTube: https://youtu.be/QEy9RO7bEJ8 -- I listened to it today, I thought it was pretty good. It digs into the history of a very important political year of boomers' lives: 1968. And it started to answer why the demographics of US political institutions skew so much toward people in their 70s and 80s (and, occasionally, 90s).
Recent data visualization on that: https://github.com/amontalenti/home/assets/40263/c21a34e4-2c...
This is the Thiel quote I'm reacting to here: "What I would add to Mark's summary is that, in a healthier society, the handover from the Boomers to the younger generations should have started some time ago (maybe as early as the 1990s for Gen X), and that for a whole variety of reasons, this generational transition has been delayed as the Boomers have maintained an iron grip on many US institutions. When the handover finally happens in the 2020s, it will therefore happen more suddenly and perhaps more dramatically than people expect or than such generational transitions have happened in the past."
exiftool -all= -o ${filename}.stripped.pdf ${filename}.pdf
That won't help you with small differences in the contents, but might help with small differences in metadata. Running `md5sum` on the stripped PDF should give more reliable dedupe results.I was recently working on a similar problem for JPG, RAW, and MP4 files (photo/video backup) so it is fresh in my mind.
Think of removing a commercial break from a broadcast clip or removing a "waiting for speaker" prelude from a 1 hour recorded lecture/speech.
(Unfortunately, VideoReDo was proprietary, produced by an indie developer, and that indie developer recently passed away.)
For those who don't really get what "lossless" video editing is all about, consider that most video editing software always involves these stages: importing video/audio "clips", storing the video/audio timelines in some sort of "app native" format (e.g. Pitivi, Premiere, Final Cut), and then exporting the completed video in one or more output formats (e.g. MP4, MOV), re-encoding the entire thing from scratch.
This means that if your only goal is to, say, cut 30-90 seconds out of a 1-hour video, you're still going to have to re-encode the entire 1-hour video. That also means if your re-encoding system isn't a match for however the original video was encoded, you'll make some changes you didn't intend via the re-encoding (e.g. video or audio quality changes).
With this "lossless" style of editor, however, it'll figure out a way to "snip out" the 30-90 seconds (you can think about this being "at the byte level") without re-encoding the entire thing.
https://gist.github.com/amontalenti/dabeba392b8ac144c6f68bdd...
The guide stemmed out of the fact that I saw questions related to all this from beginner programmers, even those with CS degrees. I think one of the issues is that CS departments (including the one I went through at NYU years ago) think some of these things are sort of like "implementation details" of computing/programming, so no one course ever focuses on the topics in a cohesive way. They just sort of expect you to pick it up by osmosis. When I was an undergrad I supplemented by working on GNOME/GTK open source projects, which gave me nice exposure to UNIX tooling, version control, issue trackers, as well as compilers, C, and Python.
(Funny enough, we did have a course on shell programming at NYU way back when, but it was only because the author of ksh, David Korn, was a professor!)
I also Google'd around a bit on this topic and it looks like there is an alternative set of tooling, wiki2book, focused on doing the same thing, but generating EPUBs that look good on e-reader devices. It also smartly doesn't require a modified/extended MediaWiki server, handling the quirks of the live Wikipedia instance specifically. Here is the info on that:
https://www.reddit.com/r/wikipedia/comments/189qqxe/wiki2boo...
For Linux users who also use Google Photos already, you may not realize this but the Google Photos web app accepts paste from system clipboard via Ctrl+V in the browser. Thus, my workflow if I want to save a screenshot for later is to call up flameshot in rectangular selection mode (I bind it to the PrtScn key), select my screenshot area, Ctrl+C to copy it to clipboard, navigate to GPhotos web app via address bar / bookmark bar shortcut, and Ctrl+V to upload there.
The nice thing about this is that GPhotos recognizes it as a screenshot (so I can find it on my phone later, too, for example). And, GPhotos also automatically indexes any text within the screenshot, so free text search can often find it, too.
If I need the screenshot as a file for some other purpose, I'll navigate to it in GPhotos and use Shift+D to download it.
I can also use GPhotos to privately share the screenshot with someone via their email address, or get a tokenized link for it.
Just sharing this tip because I notice a lot of people hunt around for cloud storage for desktop screenshots. But Google Photos works pretty well for this purpose already, if you use the paste-to-upload trick!
There is no commit hook on the local machine. On the local machine, you simply have a shim named "piku" which is essentially running "ssh remote /path/to/piku.py $@" to control the remote machine.
- piku deploys via git rather than scp/sftp, but authenticates via ssh like those tools
- piku supports a number of runtimes, including Python, Ruby, Node, Go, Clojure. The runtimes are implemented rather simply, you can add your own rather easily, see examples here in the code: https://github.com/piku/piku/blob/8777cc093a062c67d3bead9a5d...
- For each runtime, a mechanism is utilized to install and isolate package dependencies (requirements.txt in Python, Gemfile in Ruby, packages.json in Node, etc.)
- a Procfile and ENV file are used to declare your application entrypoints and envvars akin to Heroku / 12 Factor App ideas
- a CLI (ssh shim on dev client machine) is provided for checking status and logs from the client (as well as stop/start/restart)
- since all applications are managed via uwsgi on the remote, there is also support for worker/sidecar processes and cronjob-style scheduled tasks
- HTTPS via Let's Encrypt (acme.sh) is handled automagically for web apps
I describe more about how piku works in this tutorial:
https://github.com/piku/webapp-tutorial?tab=readme-ov-file#b...
You're right that PHP apps have a simple deployment story, and in a way piku brings something akin to this level of simplicity to other web programming runtimes.