OSX has some pretty nice features for optimizing access to frequently-used files; it preferentially caches and defragments them and places them on the faster part of your disk; this is especially apparent if you have a Fusion Drive (hybrid HDD/SSD). However, OSX provides no mechanism for forcing files to be handled in this way; you just have to access them a whole bunch and hope OSX gets the picture.
So, if you want to quickly force OSX to do this, you can use this very simple Automator script, which just forces OSX to read the contents of whatever directory or bundle you drag-and-drop into it 5 times. This is especially useful for optimizing file access to large media projects in apps such as Final Cut, Logic Pro, and so on. If you use Logic and get the dreaded "audio system overload" or "disk too slow" errors, try dragging your project folder in and see if that helps.
This doesn't actually change any file contents; it just scans through them so that OSX knows that you really want to access these files particularly quickly.
Note: This will only work on folders and bundles. It would be relatively easy to make it work on individual files if enough people want it, but there isn't as much use for that.
These days, it's no longer good enough to use local phone number formats for your address book; you might be trying to dial someone via SIP without any clear locale information, for example, and so trying to dial a 10-digit US number might end up routing the call to some other country, which can be quite embarrassing.
Further, in this day and age, you might actually be travelling between different countries, and so you can't really predict what your outgoing call routing will be like!
So, here's a really simple C++ program that wraps the Google libphonenumber to normalize the phone numbers in a .vcf file (used by most modern address book systems) based on your current locale.
See the code comments for usage details.
Because the need for color manipulation comes up fairly often in computer graphics, particularly transformations of hue, saturation, and value, and because some of this math is a bit tricky, here's how to do HSV color transforms on RGB data using simple matrix operations.
Note that this isn't for converting between RGB and HSV; this is only about applying an HSV-space modification to an RGB value and getting another RGB value out. There is no affine transformation to convert between RGB and HSV, as HSV is not a linear color space.more...