clash
You forgot to argue about the LOC vs file count issue.
Also, you are wrong: None does auto sleep on script exit.
My first attempt was a shell script almost exactly like yours. Then I thought I want to be able to set SUID so I don't have to use sudo. This ruled out the shell script. I could have just done a bunch of 'system("pmset ...")' calls but thought I might as well use the native commands.
The API call that 'sudo pmset -a disablesleep 1' does is literally the first thing caffeine+ does. But is only part of the full solution: As soon as the lid closes the command is automatically reverted so you can't forget to do it yourself. Also if you kill caffeinate+, the MacBook is put to sleep when the lid is still closed.
I did not want GUI, just super simple caffeinate-like CLI. Also I wanted auto-shutdown afterwards.
1) It is an insane bloat if you just want that one feature. 2) There is no CLI, just GUI.
1) It does not behave like caffeine where I can just kill the process and the behavior is reverted.
2) It does not put the MacBook to sleep automatically.
2) Because you can for example be connected via ssh: You run the script and if your connection is disconnected, caffeinate+ shuts down the MacBook.
Edit: The API call that 'sudo pmset -a disablesleep 1' does is literally the first thing caffeine+ does. As soon as the lid closes the command is automatically reverted so you can't forget to do it yourself.
This can be handy when you have a long running task active but need to close your MacBook – for example to change trains, head home from a café or commute to the office.
Show HN: PickyCal – Filter upcoming and future events into your calendar
I wanted upcoming events in my calendar, but not entire schedules full of things I don’t follow. So I built PickyCal.Pick an event source, filter it, and subscribe through CalDAV or an ICS link. For example: Starship launches, the next James Bond cinema release, Classic Tetris World Championship finals. Filters support &, |, !, and parentheses.PickyCal regularly checks for new events and...
bool isRestricted(uint8_t* /* data */) { return true; } // Might catch a few false positives
and
popup("This is a restricted model. If you are not in the state of New York, please flash the international firmware ([link]) to print restricted parts.");
It can also handle STL, step and all kinds of other formats.
It doesn't need to ruin the metaphor, though: The sun could do that job. It could also explain the fact that the portion that's taken differs depending on where on earth you are creating the snowball.
I just wanted to show off the new battery-powered E-Ink picture frame that I have been working on for the last couple of months.
It took a lot of work. I hope you like it.
A second generation E-Ink picture frame
Note: I sell them.
https://framelabs.eu/en/product/artframe-31/
I use the 31.2" panel because it is 40% cheaper and has higher DPI, but the 42" panel is also possible.
Show HN: Touchless wake up of a battery powered device
https://blog.framelabs.eu/touchless-input/
I've been working on a prototype ArtFrame (battery powered picture frame with epaper display) that can be woken up by briefly hovering over it with a hand. So far it is only a prototype, but it works reliably.Please let me know what you think.
Study time complexity of insertion, deletion, search, etc. in these data structures. Then you will understand when to use which. Big O notation is used to express time complexity for expected runtime of the operations.
An experiment on using color epaper displays to show digital art
I built something similar but more versatile, where you can either display images or feed the display with whatever information you want remotely. And it runs on a battery for a whole year:
EPDiy looks interesting, though.