Live data from Hacker News

OS X Command Line Utilities

mitchchn.me

111–120 of 210 posts

Re: OS X Command Line Utilities

#111
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…

Awesome! I'll definitely use an American voice for recording a product video next time.

Re: OS X Command Line Utilities

#112
post #73
post #57

Earlier quoted context omitted.

What are current UNIX tools? OS X supports what is expected from a POSIX compliant OS. I guess you mean BSD and GNU extensions to POSIX.

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.

Re: OS X Command Line Utilities

#113
post #28
post #25

Earlier quoted context omitted.

Have you ever asked yourself if maybe you're just being annoying? I don't lock my computer. It'll time out and lock after an hour but I prefer to leave it unlocked.

That's pretty terrible opsec. It presents a risk to separation of roles / compartmentalization if a coworker can walk over to your workstation and have access to it, to say nothing of malicious access by somebody who shouldn't be in the office in the first place.

If locking your computer in the office is required opsec, then you have already lost. First, you shouldn't have random people walking around the office. Once someone has physical access the battle is already over. Second, rogue employees are still rogue employees, and an unlocked computer is the least of your worries.

With that said, I always lock my computer out of habit.

Re: OS X Command Line Utilities

#114
post #92

Earlier quoted context omitted.

"I don't lock my computer." This is a fire-able offense where I work.

That's a metric I use to know when it's time to change jobs: if I can't trust the people around me not to mess with my computer (or there's too many people to trust the environment) then it's time to move on.

I agree. If you cannot trust your co-workers/employees to the point where every computer has to be locked when someone leaves their desk then it is time to move on. If there are rogue employees then the battle is already lost and a locked computer isn't going to slow anyone down.

Re: OS X Command Line Utilities

#115
One nice application I've found of pbpaste is when I want to count things I find in a browser. For example, to count the (approximate) number of comments in this thread, you can copy all text using Cmd+A, Cmd+C, then run this:

pbpaste | grep ago | wc -l

In this case there are easier (and more accurate) ways, but in other situations you can use it to find the length of a list on the web where it would otherwise be harder.

Re: OS X Command Line Utilities

#116
post #39
post #26

Earlier quoted context omitted.

I must say...being a sysadmin with the ability to ssh into developers' laptops remotely in our domain...this is one of the more fun commands ;)

I hope that ssh'ing into anyone's laptop using your sysadmin credentials in order to play a prank is a fireable offense at your company.

I think you're right. But I also have the luxury to work in a company where not one except me has root on my work computer.

Re: OS X Command Line Utilities

#117
post #88
post #49

Earlier quoted context omitted.

And I hope that I would get fired for a little rare, light-hearted humor as I wouldn't want to work there anyways. Chill out, winston.

> Chill out, winston Please don't. This comment would be fine with just the first sentence.

"Chill out, winston"

It's a British expression made popular by a movie. He is not calling out the guy by his first name.

Re: OS X Command Line Utilities

#118
post #28

Earlier quoted context omitted.

That's pretty terrible opsec. It presents a risk to separation of roles / compartmentalization if a coworker can walk over to your workstation and have access to it, to say nothing of malicious access by somebody who shouldn't be in the office in the first place.

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?

Re: OS X Command Line Utilities

#119
post #77

Earlier quoted context omitted.

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.

Two-part response. 1, the pedantic: technically none of them know how to speak English, or any other language - there's just a rule set for making phonemes based on characters out of waveforms. 2. Ignoring the pedantic response, I still don't think that's true - if that were the case, then Milena wouldn't be able to speak an English sentence! say -v Milena "Hello, I am Milena" If they only speak their own language, t…

It's even more complicated than that: Some voices DO speak multiple languages, e.g. the German voice "Anna" (downloaded from System Preferences) speaks excellent German, English, Spanish, Italian, and French:

   say -v Anna 'über allen Wipfeln ist Ruh'
   say -v Anna '[[lang fr_FR]] que restet-il de nos amours'
   say -v Anna '[[lang it_IT]] chi nasce asino non muore cavallo'
   say -v Anna '[[lang es_SP]] nosotros tenemos mas influencia  con sus hijos que su tiene'
   say -v Anna '[[lang en_UK]] are we having fun yet?'

Re: OS X Command Line Utilities

#120
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…

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.

It's not a question of handling languages but of handling scripts. I believe all voices can handle Latin, in addition to their native script (So Russian voices can handle Latin & Cyrillic, but English voices handle only Latin).
Post reply on HN