Monday, 31 May 2010
Anyway it's really useful and it's found under Start > Programs > Accessories.
You need to have the "Tablet optional components" part of windows installed which can be added under "Control panel" > "Programs and features" > "Turn on/off windows components"
Saturday, 29 May 2010
com.apple.launchd.peruser.501 Warning (com.apple.ReportCrash) Falling back to default Mach exception handler. Could not find: com.apple.ReportCrash.Self
The solution, go to /System/Library/LaunchAgents and copy com.apple.ReportCrash.Self to ~/Library/LaunchAgents/
Then reboot. This also speeded up my login.
/System/Library/Frameworks/PubSub.framework/Versions/A/Resources/PubSubAgent.app/Contents/MacOS/PubSubAgent Alert MDS Error: unable to create user DBs in /var/folders/Ko/Ko4nhsn0FmCj+CMp+uU4pU+++TI/-Caches-//mds
It was repeated a bunch of times for different apps, to fix it reboot your mac and hold the shift key which boots into safe mode which erases the db cache. Reboot again and everything works fine.
Thursday, 27 May 2010
Friday, 21 May 2010
HFS+ Compression however doesn't have a tick box to enable it on a drive. Also any OS that mounts it that is pre 10.6 can't read the files (although file sharing still works).
I've written a script that will compress directories (one file at a time so if you have low disk space you only need as much as the largest file free).
It must be run as root and the first argument is the directory to scan (remember the trailing slash) I personally ran it on my /Applications/ folder and saved 30% space (6GB).
The script is below
foreach($dirs as $d)
if(substr($d,-4)==".app" or !is_dir($path.$d))
echo "Current free space ".$c.PHP_EOL;
exec("ditto --hfsCompression ".escapeshellarg($path.$d)." ".escapeshellarg("/tmp/ditto/$d"));
exec("rm -rf ".escapeshellarg($path.$d));
exec("mv /tmp/ditto/".escapeshellarg($d)." ".escapeshellarg($path.$d));
$n=preg_replace("/((?![0-9]).)*/","",exec("du -d 0 ".escapeshellarg($path.$d)));
echo "New free space ".$n.PHP_EOL;
echo (($n-$c)/1024/1024)."MB space freed".PHP_EOL;
echo (($n-$i)/1024/1024)."MB space freed so far".PHP_EOL;
echo "Done with ".$path.$d.PHP_EOL;
if(posix_getuid()!=0) exit("Must run as root");
if(!is_dir($path)) exit("This is not a directory");
echo "Initial free space ".$i.PHP_EOL;
exec("rm -rf /tmp/ditto");
echo "New total free space ".$n.PHP_EOL;
echo (($n-$i)/1024/1024)."MB space freed".PHP_EOL;
Wednesday, 12 May 2010
Monday, 3 May 2010
When positioning a relative element normally you'd use margin:0 auto; this doesn't work on an absolute element...or does it? Well sort of, you need to add right and left positioning, so for dead center add right:0; and left:0; so you end up with