Saturday, September 29, 2012

Tabs in Finder (Mac OS X filesystem explorer)

You can use the TotalFinder extension to beef up the Finder program in OS X (including add tabs!)

As of writing, there's a 14 day trial (which I've used for longer than 14 days without issue so far), and program cost is $18.

Sunday, August 19, 2012

Disable animations when switching desktops in Lion

As mentioned here, TotalSpaces lets you disable the animation for switching between spaces (look on the Transitions tab). Yay!

Tuesday, July 3, 2012

Automatically sync Windows time with Internet at boot

If you want Windows to sync with its Internet time servers at boot (e.g. your CMOS battery died and you're too lazy to replace it), put the following into a batch file and put it in the All Users Start Up folder:

fix-time.bat:
net start w32time 
w32tm /resync /force


Put it in the All Users startup folder:
1) Right click on Start Menu -> All Programs -> Start Up and choose Explore All Users
2) Copy fix-time.bat into that folder

Friday, March 23, 2012

Controlling MPD via hotkeys in OS X

You can use Spark to set global hotkeys in OS X. Then, to control mpd with mpc, create AppleScript hotkeys with the following commands, and bind them to the desired key combination:

  • do shell script "/opt/local/bin/mpc prev"

  • do shell script "/opt/local/bin/mpc toggle"

  • do shell script "/opt/local/bin/mpc next"

Saturday, January 21, 2012

Profiling node.js on linux

According to "Understanding V8" by Vyacheslav Egorov, you profile node applications like this:

% node --prof parser.js
806 ms
711.4267990074442 bytes/ms
% deps/v8/tools/mac-tick-processor

[GC]:
ticks total nonlib name
576 79.0%

However, I couldn't get the linux-tick-processor (in the same folder) to work:

% ~/Documents/node/deps/v8/tools/linux-tick-processor v8.log
d8 shell not found in .
To build, execute 'scons d8' from the V8 directory

I ran scons as instructed, but the command still wouldn't work. What I finally realized is that I need to run the command from the v8 folder:

% pwd
/home/iggames/Documents/node/deps/v8
% tools/linux-tick-processor ~/code/nodetest/v8.log


Lame, but it works.