Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

91–100 of 406 posts

Re: Quick tip for developers who use OS X

#91

Another really useful command is the open $ open filename.png $ open . $ open -e filename.txt $ open -a Pixen filename.png The first command will open the file with the default application. Open . will open the current directory in finder, which I find very helpful. The -e flag will open the file in textedit. The -a will open the file in the given application name.

open -n is also useful: Allows you to run two instances of the same app at a time.

Re: Quick tip for developers who use OS X

#93
post #41

I wish there was a way to make the mouse cursor stand out more when (and only when) it's over the terminal. Maybe it's because I use a dark terminal background, I can hardly ever see the thing. There's a system wide setting to make the cursor huge, but I don't want a huge cursor everywhere. And there's a terminal preference to make the insertion cursor different, but that's a different cursor, not the mouse cursor. W…

in windows theres something where you can press controll and it will shoot circles out from your mouse which is pretty useful, not sure if there is anything like that in osx

Re: Quick tip for developers who use OS X

#95
post #72

Nobody seems to have posted this yet: python -m SimpleHTTPServer I'd recommend an alias like "serve". It basically puts the current directory online (binds to 0.0.0.0:8000).

Am I wrong to have long dismissed this as little more than an easter egg, or, at best, a toy server to test basic webpage functionality?

Yes. It's like a ghetto SCP for giving files to people on windows who don't have SCP. You can use it for basic web functionality, you can use it (carefully) as a mechanism for testing or serving test results. I wouldn't keep it running for days, but it's an amazingly useful tool.

Re: Quick tip for developers who use OS X

#98
post #23

Osx terminal uses almost all of the emacs movement keys by default. Ctrl-a and ctrl-e are useful but I find the meta movement keys to be the most helpful. (usually alt or ESC) Meta-f jump forward a word Meta-b jump backwards a word

That's bash. Works on all platforms, all terminals, as long as bash has been compiled with readline.

Re: Quick tip for developers who use OS X

#99
post #52

Bash, running in your terminal, understands both the Emacs and the Vi commands. By default is Emacs, so you can C-a (control-a) for beginning of line, C-p to go back in command line history, or C-r to search it. I prefer the Vi mode, though. Add to your .bashrc set -o vi Then you can press escape to go from input mode to normal mode; there k will take you to the previous line in command line history, j to the next li…

great tip. on my system i added it to .bash_profile.

Re: Quick tip for developers who use OS X

#100
post #38

A new one for me I accidentally found the other day.. If you use Spotlight to find something and then want to see the file in Finder, Cmd+click the item in the Spotlight dropdown. Edited from Cmd+shift+click due to note in child comment :-)

isn't it just Cmd+click ?

In Mavricks (only one I can be sure of) when you hover over spotlight results and hold Cmd, you get a (quite nice) file preview/info.
Post reply on HN