Live data from Hacker News

OS X Command Line Utilities

mitchchn.me

131–140 of 210 posts

Re: OS X Command Line Utilities

#131

I like do harmless pranks on coworkers who don't lock their computers yes "lock your computer, numbskull" | xargs say Just repeats the phrase in a monotone computer voice over their headphones. I only do this to engineers, tried it on a PM once, never again.

[deleted]

Re: OS X Command Line Utilities

#133
post #112
post #73

Earlier quoted context omitted.

OS X ships outdated versions of Bash and Git for example. The 10.10.5 version ships Bash 3.2 and Git 2.3, while Homebrew gives you Bash 4.3+ and git 2.5+.

This is the usual mistake young generations do in regard to UNIX, neither bash nor Git are part of UNIX standard. POSIX IEEE Std 1003.1, 2013 Edition defines sh as the shell. There is no git in POSIX IEEE Std 1003.1, 2013 Edition.

Virtually every person who uses any modern Linux or OS X system expects bash to be installed and in the modern vernacular it can be completely and safely considered, in informal discussion, to be part of relevant Unixes. You knew exactly what he meant, but for some reason (and I won't speculate but it isn't a good look on you) you decided to be pedantic for the sake of being pedantic. You're not being helpful to anyone or anything and should stop, and you know it.

Re: OS X Command Line Utilities

#134
post #77

Earlier quoted context omitted.

This is great, and the voices apparently only know how to speak English, and their own language! That is, typing say -v Milena "Здравствуйте, меня зовут Milena. Actually says, "Zdravstvuyte...", while typing say -v Bruce "Здравствуйте, меня зовут Milena. Results in "Cyrillic capital letter 'Z'. Cyrillic small leter 'd'.", etc.

They don't actually know how to speak English. If you listen carefully, what they are doing is sounding out English using the pronunciation rules of their "native" language. It's not an accent at all, just a literal parsing using different rules.

They actually do, but only if you also download the entire language packs for them.

Re: OS X Command Line Utilities

#135
post #44

Earlier quoted context omitted.

https://itunes.apple.com/us/app/caffeine/id411246225?mt=12 I use this all the time, it's the GUI version presumably.

It uses the same underlying API. I use it too. It’s only on–off, though, so you have to remember to turn it off.

> It uses the same underlying API

I don't think so. For whatever reason Caffeine doesn't take a power assertion, as show by `pmset -g assertions`, whereas caffeinate does.

This is what prompted me to write Theine (https://github.com/lvillani/theine) to use the proper API for this task, since Caffeine would behave erratically with the lock screen active.

Re: OS X Command Line Utilities

#136
post #112

Earlier quoted context omitted.

This is the usual mistake young generations do in regard to UNIX, neither bash nor Git are part of UNIX standard. POSIX IEEE Std 1003.1, 2013 Edition defines sh as the shell. There is no git in POSIX IEEE Std 1003.1, 2013 Edition.

Virtually every person who uses any modern Linux or OS X system expects bash to be installed and in the modern vernacular it can be completely and safely considered, in informal discussion, to be part of relevant Unixes. You knew exactly what he meant, but for some reason (and I won't speculate but it isn't a good look on you) you decided to be pedantic for the sake of being pedantic. You're not being helpful to anyo…

[deleted]

Re: OS X Command Line Utilities

#137

Earlier quoted context omitted.

Security requires a threat model to rise above theatre. If there are operations threats to your organization, then you need opsec to mitigate those threats. Is China or someone else trying to steal your trade secrets? If so, I would hope the responsibility for setting opsec policy isn't resting in one sysadmin.

> Is China or someone else trying to steal your trade secrets? Or more prosaically, do you have any semi-confidential e-mail on your machine, that a coworker might fancy reading?

If you can't trust your coworkers not to go snooping on your machine while you're not there, then you should find a better job. Threat models balloon in complexity when you can't use tools like zones of trust and choke points.

Re: OS X Command Line Utilities

#138
post #124
post #4

This article was nice, but it indicated that you need to change the system preferences in order to change the voice. It turns out that you can pass the -v flag to use a different voice, or "-v ?" to get a list of names. So you can do say -v Samantha Help, I'm trapped in this castle! or say -v Princess Help, I'm trapped in this castle! But wait, it gets even better: The Mac comes with a number of voices for other lang…

Another fun one: say -v cellos dum dum dum dum dum dum dum he he he ho ho ho fa lah lah lah lah lah lah fa lah full hoo hoo hoo Edit: 'In the Hall of the Mountain King' if anyone is curious. There is also 'Pomp and Circumstance': say -v Good dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum dum and Chopin's 'Funeral March': say -v Bad dum dum dum dum dum dum dum dum dum dum dum dum d…

And yet another:

   say --voice='?' | perl -lane 'my $v = $F[0]; system("say -v $v \"Hi $ENV{'USER'}\"")'

Re: OS X Command Line Utilities

#139

As a longtime Mac user (as early as System 7) and aficionado of UNIX, I love OS X's CLI and its affordances. The linked article provides several well-packaged tidbits that might encourage users of other CLI-replete OS's to check out OS X. More power. However, I'm not a fan of the soft recommendation for Homebrew. I understand Homebrew places everything in `/usr/local` but software installs on Mac should generally con…

I would expect that a significant percentage of unix packages would throw a fit if they had to live in their own subtree.

Re: OS X Command Line Utilities

#140
post #46

I have fond memories of discovering my college roommate's open SSH connection, and using "say" to great effect.

Back in the day you'd "telnet" into your friend's "Sun workstation" and cat an "aiff" to the "/dev/audio". How times have changed! :-)

The Sun 3/50's pixel buffer was world readable and writable by default, and in console mode had an area at the bottom not affected by scrolling. One could invert random horizontal bars across the screen, transpose the bitmap, or apply a sine wave to persuade the user the massive TV set on top of their workstation was broken. Or, fade text in and out as if the machine was commenting on the user's ineptitude. Much fun was had by all.
Post reply on HN