Live data from Hacker News

Quick tip for developers who use OS X

news.ycombinator.com

101–110 of 406 posts

Re: Quick tip for developers who use OS X

#101
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?

I use it quite a lot to move files between my computers, stream content to my phone, test out web designs. I suppose it's like net cat, it's useful for some. I think "toy server" is fairly accurate, I can't see anyone using this in production but I can't see people installing nginx on their laptops either.

Re: Quick tip for developers who use OS X

#105
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?

The only problem it really solves is if you've got non-relative paths in your HTML/CSS. I've used this a couple of times in those situations.

Re: Quick tip for developers who use OS X

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

C-a : beginning line, C-e end line, alt+f forward word (unless system shortcut for file menu), alt+b back word, C-k kill line, C-b back char, C-f forward char.

At least in my current setup, C-w yank and C-y paste works as well.

Immensely helpful. Sometimes at+left/right does forward/ back word depending on the terminal emu.

Note most of these keystrokes are valid in nano as well.

Re: Quick tip for developers who use OS X

#107
post #58
post #32

Earlier quoted context omitted.

You can also use shift-option-cmd-v to directly paste without markup :)

I can never remember which combination that is, but thanks.

You can override any key combination using the Keyboard preferences.

Just make a new shortcut under the All Applications group named exactly the same as the one you want to replace. http://i.imgur.com/JqBncTy.png

I've also had to add an entry for "Paste as Quotation" because that's Mail's default use of Command-V.

Re: Quick tip for developers who use OS X

#108
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?

Depends on what you're developing. If you're doing single page apps that get their data from an external service then this is incredibly useful.

Re: Quick tip for developers who use OS X

#109
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

There are a few options for cursor highlighting here: http://osxdaily.com/2011/07/12/3-ways-to-make-the-mac-os-x-c...
Post reply on HN