Hacker News new | ask | show | jobs
by Altimor 1069 days ago
OP — I’m not that privy to the details of what in the world was running on that MacBook Air, but I’m 100% sure it wasn’t “the production servers for Uber eats Canada.” It was some kind of hack doing some kind of thing on a recurring basis to make sure the service continued. These things were often hacked together by engineers, and sometimes ops people, in the middle of outages, as a stop gap.
2 comments

Not that I condone this sort of thing, but folks who do need to do it should know about caffeine [0] which allows a Mac to disable it's lid switch and keep running with the lid closed.

[0] https://www.macupdate.com/app/mac/24120/caffeine

Side note, Caffeine[1][2] does not disable it's lid switch, but instead disables the automatic sleep behaviour while enabled.

[1] Author link (includes link to source): https://www.intelliscapesolutions.com/apps/caffeine

[2] Original author link (stopped updating before OSX Mojave): https://www.lightheadsw.com/caffeine/

i switched from caffeine to amphetamine due to compat issues and amphetamine does have a mode to disable the lid switch
Or you can use the built-in and more powerful commands: pmset and caffeinate.

E.g. you can prevent sleeping until another process exists, or initiate sleep or shutdown.

yep definitely pulled this move before. Probably on a laptop because it is the only thing that has permissions to do whatever insanely janky thing it’s doing.
Sounds like something probably in the System keychain, that's not getting unlocked when the user is logged out.

Incidentally, the command to unlock the system keychain (eg in a cronjob) is:

  systemkeychain -vt
That doesn't seem to be widely known, and is very useful for things like build jobs. ;)