Thursday, May 2, 2013

Hide Menu Bar in OSX

The Dock can be hidden but not the Menu Bar. There is no option anywhere in OSX that allows you to do that.

There are apps that do this but why install an app when you can just run this script to hide the Menu Bar in OSX.

Here is this simple PHP script which you can run to auto-hide your Menu Bar for all OSX apps.
<?php

$plists = explode("\n", `ls /Applications/ | awk '{ print "/Applications/"$0"/Contents/Info.plist" }'`);
foreach ($plists as $plist) {
 if (!$plist || strpos($plist, '.DS_Store') !== FALSE || strpos($plist, '.localized') !== FALSE || strpos($plist, 'Utilities') !== FALSE) continue;
 $c = file_get_contents($plist);
 if (strpos($c, 'LSUIPresentationMode') !== FALSE) continue;
 $c = preg_replace('/(plist.*?\n<dict>)/', "$0\n\t<key>LSUIPresentationMode</key>\n\t<integer>4</integer>", $c);
 file_put_contents($plist, $c);
}

?>
Copy and paste this code into a file called:
hide-menu-bar.php
and execute it by running:
sudo php hide-menu-bar.php
Here is how it works. For all apps in /Applications it loops through their Info.plist file and adds a new entry which causes the Menu Bar to auto-hide when that app is running.

Tuesday, February 5, 2013

Youtube 2x: Youtube on Repeat

Ever wanted to repeat a Youtube music video? Well I created youtube2x.com; while watching a video on Youtube just change the domain name to youtube2x.com and hit enter in your browser.

This Vine video explains it all:)