Archive for the ‘osx’ Category

perl sorting IP addresses

Tuesday, November 15th, 2011

if you have to deal with big ass arrays of IP addresses in perl and you’ve been sorting.  i recommend reading the following paper.

A Fresh Look at Efficient Perl Sorting - if you’re looking for a  portable means to do an efficient multi-subkey record sorts this is a great run down on the machinery within perl to make it faster.  acquaint yourself with the Schwartzian Transform. it’s a good thing.

yes, i know, you could just use Sort:Key:IPv4.  but that’s not very portable and self-contained, now, is it?

OS X annoyance – hostname

Monday, November 14th, 2011

because everywhere i go DHCP shoves its crap at me.

% sudo scutil --set HostName ZenHound

for that matter, scutil is an incredibly useful tool which allows you to probe the configd state in a lot more detail than i realized. very useful.

fixing a lion nit

Monday, August 1st, 2011

about those oh so annoying window animations, make them go away:

defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool NO

oh emacs, you are the bombdiggity.

Wednesday, July 13th, 2011

lately, i’ve been doing a lot of writing for work.  test plans, paper outlines, summaries, etc.  i don’t know what the deal has been but it’s been a notable shift in prose generation.  despite the fact that my co-workers seem to do everything in MSFT word, i have a strong need to do at least the first cut in emacs.  here are a few things that have made me most productive on the prose generation front.

  • org-mode – if you haven’t heard about this, well, get out from underneath your rock.  this is where i do 90+% of my outlining and meeting note capture.  C-c c is the catchall for things which require more verbiage than one can capture with the omnifocus pop-up.  if i need to start grabbing shit freestyle, this is where i go.  it’s a dessert topping, floor wax and an organizer all wrapped up in one.  did i mention that there’s a handy twiki export mode as well?  oh, and the latest version includes support for opendocument text format export.
  • ns-toggle-fullscreen – this is a patch to emacs for OS X.  if you build emacs.app from the ports collection you simply need to include the +fullscreen variant and you’re golden.  this removes all the chrome from emacs (which should be turned off for the most part anyway) and forces emacs to take up the entire screen.  it’s incredibly useful.  you have the ability to split the display, etc. but you’re doing it over all of you display.  bigass router configs and code can line up side by side and you’re not going to have email, etc. getting in the way.
  • darkroom-mode – while ns-toggle-fullscreen gets you about 90% there for a distraction free environment, it’s nice to have large margins on the side of the screen to focus the display right in the middle.  darkroom-mode emulates the popular writeroom, scrivener and other applications focused on minimizing distraction. but it gives you all of the power of emacs. very nice. you don’t have to retrain your fingers only to pull it back into emacs to do the cleanup and organization anyways.
  • solarized theme – when i’m not in full screen writing mode, this theme is incredibly easy on the eyes.  i’ve basically embraced this across the board for X11, term, iterm, vim, emacs, etc.  the dude who assembled this, did his homework.  folks have ported this theme to pretty much everything, it’s worth adding the git repo to your collection of stuff to keep track of.

your IP address : 38.107.179.206