Categories
General

Custom sudo in macOS

This is a little macOS quality of life thing I recently learned and documenting here for my future self.

Like many other command line junkies, I use a custom sudoers file to make sudo more convenient. However unlike in previous years, I’ve noticed the past few times I upgrade macOS, both minor/point updates and the recent Big Sur beta, my sudo customizations (i.e. the sudoers file) get swallowed, and I have to manually restore.

Now in fairness macOS is at least polite enough to move the file into this ‘Relocated Items’ folder instead of deleting it outright. But still a hassle to manually patch.

TIL it seems you can simply drop in sudoers customizations into a new file inside
/private/etc/sudoers.d

As far as I can tell sudo config customizations placed here will survive macOS upgrades, which means one less manual chore for me next time. Less churn = happier me.

Categories
General

Fix your older iPhone’s battery life

Warning: This is intended for do it yourself-type folks not scared of opening up electronics. 

Fixing your battery life is easy:

  1. Install a replacement battery, easily available online (and cheap).
  2. Replace Facebook.app with the mobile web version.

Instead of jumping on the iPhone 6S upgrade train*, I recently got a replacement battery for my older model iPhone.

For $15 and 20 minutes, it’s super nice.

* According to certain reports iOS devices are produced in less than ideal conditions. In fairness, I hear things are improving of late.

Categories
Design General Handy Interface Technical

Make SkyDrive.app a true background app in one step

The goods:

defaults write /Applications/SkyDrive.app/Contents/Info LSUIElement 1

What a busy week it’s been in the cloud file hosting world.

I don’t like ‘set and forget’ apps cluttering up my Dock/app switcher. So since that’s exactly what the SkyDrive preview is doing on my Mac, that little one liner is how to fix it.

(Assuming you’ve already downloaded and installed the SkyDrive.app preview into /Applications/, pop open a Terminal and hook up that one-liner. Tested on Lion 10.7.3. Bonus hack: The Info.plist file also is where the minimum OS requirement is stored. i.e. you might be able to get SkyDrive.app to work on <10.7 if you poke around in that file, but whatever consequences that has are definitely on you.)
Change your mind?

defaults write /Applications/SkyDrive.app/Contents/Info LSUIElement 0

will set things back to default, or just download a new copy.

Surely there are some big challenges in building a project like SkyDrive.app. So hey MacBU, or whoever’s on this, good work so far. But in case it’s not already in the pipeline, here’s one user’s humble request to put that checkbox in the prefs where it belongs.

[Shout out to you classy LaunchBar folks – the basis for this hack dates back to those halcyon days.]

Categories
General

Motivation

http://www.vimeo.com/29893440

Wonderful video. The back story is posted on the Vimeo page.

Categories
Cool General Humor

Perhaps my all-time favorite movie monologue

http://www.youtube.com/watch?v=UrOZllbNarw&feature=player_embedded

Why shouldn’t I work for the NSA? That’s a tough one. But I’ll take a shot. Say I’m working at the NSA, and somebody puts a code on my desk, something no one else can break. Maybe I take a shot at it, and maybe I break it. And I’m real happy with myself, ’cause I did my job well.

But maybe that code was the location of some rebel army in North Africa or the Middle East, and once they have that location, they bomb the village where the rebels are hiding. Fifteen hundred people that I never met, never had no problem with, get killed.

Now the politicians are saying, “Oh, send in the marines to secure the area,” ’cause they don’t give a shit. It won’t be their kid over there getting shot, just like it wasn’t them when their number got called, ’cause they were pulling a tour in the National Guard. It’ll be some kid from Southie over there taking shrapnel in the ass.

He comes back to find that the plant he used to work at got exported to the country he just got back from. And the guy who put the shrapnel in his ass got his old job, ’cause he’ll work for fifteen cents a day and no bathroom breaks.

Meanwhile, he realizes the only reason he was over there in the first place was so that we could install a government that would sell us oil at a good price. And of course the oil companies used the little skirmish over there to scare up domestic oil prices — a cute little ancillary benefit for them, but it ain’t helping my buddy at two-fifty a gallon.

They’re taking their sweet time bringing the oil back, of course. Maybe they even took the liberty of hiring an alcoholic skipper who likes to drink martinis and fuckin’ play slalom with the icebergs. It ain’t too long ’till he hits one, spills the oil, and kills all the sea life in the North Atlantic.

So now my buddy’s out of work. He can’t afford to drive, so he’s walking to the fuckin’ job interviews, which sucks because the shrapnel in his ass is giving him chronic hemorrhoids. And meanwhile he’s starving, ’cause every time he tries to get a bite to eat the only blue plate special they’re serving is North Atlantic scrod with Quaker State.

So what did I think? I’m holding out for something better. I figure: fuck it, while I’m at it, why not just shoot my buddy, take his job, give it to his sworn enemy, hike up gas prices, bomb a village, club a baby seal, hit the hash pipe, and join the National Guard? I could be elected President.

NUMA – Los Angeles Detox and Rehab
Phone: +13105983910
Url:
826 Mariposa Ave
Los Angeles, CA 90029