HNHacker News
TopNewBestAskShowJobs

pixelmonkey

6,105 karma · joined October 5, 2007

Founder of PX Systems, which ships a daily developer tool to go from code to cloud cluster in seconds. More info @ https://px.app

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

submissionscomments
pixelmonkey··on Cron Jobs on Linux – Comprehensive Guide with Examples
I have a soft spot for cron jobs. But if you use them, I highly recommend you also use the open source runitor tool:

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.

pixelmonkey··on Lewis Lapham has died
Interesting. Uploaded on: 2023-11-27. I wonder if that's actually a legal upload, though. Also seems to currently be available as a $3 rental on YouTube US in SD quality:

https://youtu.be/4uGSmnRYe48

pixelmonkey··on Lewis Lapham has died
I am glad his "documentary film" got a mention.

"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.

pixelmonkey··on Timeshift: System Restore Tool for Linux
Oh, I see what you're saying. I personally wouldn't use it to do a 100% filesystem restore. For the sake of simplicity, I'd just use dd/ddrescue to make a .img file and then load that .img file directly into a partition to boot from a new piece of hardware. Likewise if I were doing a big system change like GNOME to KDE or vice versa, I'd just make an .img file before and restore from it if it went wrong.

I think of restic system backups covering something like losing a customized /etc file in an apt upgrade and wanting to get it back.

pixelmonkey··on Timeshift: System Restore Tool for Linux
Yea, I don't want to oversell it. The restic FUSE mount isn't anywhere near "native" performance. But, it's fast enough that if you can narrow your search to a directory, and if you're using a local restic repo, using grep and similar tools is do-able. To me, using `restic mount` over a USB3 SSD repo makes the mount folder feel sorta like a USB2 filesystem rather than a USB3 one.
pixelmonkey··on Timeshift: System Restore Tool for Linux
rsnapshot was definitely my favorite Linux option before restic. I find that restic gives me the benefits of chunk-based deduplication and encryption, but via `restic find` and `restic mount` I can also get many of the benefits of rsnapshot's simplicity. If you use `restic mount` against a local repo on a USB3 SSD, the FUSE filesystem is actually pretty fast.
pixelmonkey··on Timeshift: System Restore Tool for Linux
I only have one macOS system (a Mac Mini) and Arq works well for me. Also I prefer to use Time Machine for the local backups (to a USB3 SSD) on macOS since Apple gives Time Machine all sorts of special treatment in the OS, especially when it comes time to do a hardware upgrade.
pixelmonkey··on Timeshift: System Restore Tool for Linux
I only discovered httm thanks to this thread, and I'll definitely be trying it out for the first time today. Maybe I'll add an addendum to my blog post about it.
pixelmonkey··on Timeshift: System Restore Tool for Linux
I never knew this. Thanks for sharing!
pixelmonkey··on Timeshift: System Restore Tool for Linux
I backup everything except for scratch/tmp/device style directories. Bytes are cheap to store, my system is a rounding error vs my /home, and deduping goes a long way.
pixelmonkey··on Timeshift: System Restore Tool for Linux
For me, these traits made restic initially attractive:

- 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.

pixelmonkey··on Timeshift: System Restore Tool for Linux
I agree with you, of course. On macOS, Arq uses APFS snapshots, and on Windows, it uses VSS. It'd be nice to use something similar on Linux with restic.

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.

pixelmonkey··on Timeshift: System Restore Tool for Linux
I explain in the post. Here's a copypasta of the relevant paragraph:

"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."

pixelmonkey··on Timeshift: System Restore Tool for Linux
I've probably spent way too much time thinking about Linux backup over the years. But thankfully, I found a setup that works really well for me in 2018 or so, used it for the last few years, and I wrote up a detailed blog post about it just a month ago:

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.

pixelmonkey··on The Objects of Our Life (1983)
That's an interesting Wikipedia page! Thanks for sharing.
pixelmonkey··on The Objects of Our Life (1983)
All I could think about when listening to this interesting clip is, "How many young people, today, even have any idea what he's talking about, re: computers being ugly and hard to use?" Since this is 1983, he's obviously talking about IBM PCs[1] and DOS[2] -- not even MS Windows (Windows 3.1[3] wouldn't arrive until 1993, a full decade later). But that might be lost on younger listeners today.

[1]: https://en.wikipedia.org/wiki/IBM_PC%E2%80%93compatible

[2]: https://en.wikipedia.org/wiki/MS-DOS

[3]: https://en.wikipedia.org/wiki/Windows_3.1#Windows_3.1

pixelmonkey··on Zuckerberg and Peter Thiel on Facebook, Millenials, and Predictions for 2030
Perhaps here?

https://www.economist.com/audio/podcasts/boom

pixelmonkey··on Show HN: Daminik – An Open source digital asset manager
Weirdly I know about this category of software from a prior life working at a major CMS company.

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.)

pixelmonkey··on Zuckerberg and Peter Thiel on Facebook, Millenials, and Predictions for 2030
Birth years of last 5 presidents: 1946, 1946, 1961, 1946, 1942. And, assuming no one drops out and they both survive to election day, 1942 or 1946 will be the next one.

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.

pixelmonkey··on Zuckerberg and Peter Thiel on Facebook, Millenials, and Predictions for 2030
The Economist just launched a new podcast, "Boom!", on why boomers, as a generation, have been holding an "iron grip" on major US institutions.

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."

pixelmonkey··on Diff-pdf: tool to visually compare two PDFs
You might want strip metadata before doing a comparison, using exiftool. Even though exiftool was originally written for EXIF metadata on JPGs, these days, it supports a lot of metadata standards, including PDF. This command will do it assuming you set filename=`basename your.pdf .pdf`:

    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.

pixelmonkey··on LosslessCut: The Swiss army knife of lossless video/audio editing
When I say "cut out" I mean "remove that small segment from the larger video, resulting in the large video modified such that the short section is skipped."

Think of removing a commercial break from a broadcast clip or removing a "waiting for speaker" prelude from a 1 hour recorded lecture/speech.

pixelmonkey··on LosslessCut: The Swiss army knife of lossless video/audio editing
Looks like an open source competitor to this absolutely magical app I used to use back in my Windows media PC days, way back when, which was called VideoReDo.

(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.

pixelmonkey··on The number of CS grads who don't even know basic Git commands is astounding
I think every CS undergrad (or self-taught programmer) should run through the Harvard "CS50x" course, and supplement it with the MIT "Missing Semester" course. This way you're guaranteed to have a bit of C, clang, make, Python, git, UNIX shell command, and GitHub understanding by the time you enter the industry as a programmer. I wrote a little guide to how to do this here:

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!)

pixelmonkey··on I bought an encyclopedia
On Android, the official Wikipedia app is surprisingly good at marking articles for offline reading, organizing them into collections, and downloading them, including related assets like images. When I'm traveling I install the app on my "travel phone" (which is Android / Google Fi) and take advantage of it along with Kindle app offline reading for Lonely Planet guides, and the Google Maps offline maps feature.
pixelmonkey··on I bought an encyclopedia
This article reminded me that many years ago I used to make PDF compilations of related Wikipedia articles using some tooling developed by PediaPress, and then read those offline on my laptop or iPad. I recently encountered one such compilation of cryptography & security related articles in my EBooks folder, and noticed the PediaPress metadata on the PDF. Apparently PediaPress is still around, and its tooling is still open source:

https://pediapress.com/code/

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...

https://github.com/hauke96/wiki2book

pixelmonkey··on Flameshot – Open-source screenshot software
This is my go-to screenshot tool on Linux.

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!

pixelmonkey··on Piku: Allows git push deployments to your own servers
I like your suggestions. I haven't looked at this tutorial in awhile but I have an occasion to do so coming up, so I'll keep your feedback in mind for a revision.
pixelmonkey··on Piku: Allows git push deployments to your own servers
piku installs an agent on the remote machine (piku.py) which itself also provides the support for making that machine a git remote.

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.

pixelmonkey··on Piku: Allows git push deployments to your own servers
It's actually worth taking your joke seriously to compare and contrast:

- 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.

← PreviousPage 3 of 25Next →