Free up memory in OSX Mavericks

Screen Shot 2014-03-05 at 11.23.16 PM

Lately I’ve noticed  that Mavericks OSX is consuming almost 8GB of memory which I have no idea why it used too much when I don’t have much app running. In order to free up the memory in OSX, you can try by typing



sudo purge

in terminal in which OS X will free up the “inactive” memory.

How to show hidden files in Mac Finder

This is the missing little feature in Mac that Apple doesn’t want to add it? In Windows, you can just check the show hidden files and folders in File and Folder options. In order to see hidden files and folders in Finder, open the Terminal from Applications->Utilities->Terminal. Type the following command line.

defaults write AppleShowAllFiles YES


To hide the files and folders back, just set it to NO. I hope this help.

defaults write AppleShowAllFiles NO

Adding class in li under WordPress Navigation Menus

In WordPress, you can generate menus by using wp_nav_menu function. It will show the menus you set in admin. Here is the example of menus in html version.

<ul id="menu-header-menu" class="menu">
  <li class="wordpress generated classes">
     <a href="#">Menu Name</a>
  <li class="wordpress generated classes">
    <a href="#">Menu has sub menu</a>
   <ul class='sub-menu'>
     <li class="wordpress generated classes">
         <a href="#">sub menu item</a>
     <li class="wordpress generated classes">
         <a href="#">another submenu item</a>

For some reason, you want to let your visitors know that the menu has sub menus by showing arrow or drop down icon next to the menu. In this case, you’ll need to add CSS in li element that it has child menu. There is an answer to this on stackoverflow by adding some php codes in functions.php. I found that there is an alternative way to solve this problem by using jQuery. If you’re familiar with jQuery, the following line that I used for my WordPress theme will help you with this problem.

<script type="text/javascript">

You can add the above code before head or at the end of your theme. It will add ‘has-submenu’ in li elements of wordpress menu that has sub menus. I hope this help.

How to create a new interests List in Facebook

Facebook just added a new feature called “Interests” lately. Interests is a list that shows the updates from the collection of pages, friends, and subscriptions. To create a new list, just head to Interest Lists and click “+ Create list”. Facebook will show the pop up that includes your friends, pages and subscriptions or you can add the public Interest Lists. Facebook also allows you to set privacy level (public, friends, only me) of each List you have created.


How to delete files permanently in Mac OSX

Secure Empty Trash Deleting files will go to Trash in Mac OS and you click Empty Trash to delete the files completely. For some reason, these files and data can be recovered from some utilities.

If you really want to delete the files permanently, just use the “secure empty trash”. To use “secure empty trash”, right click on Trash (if you enabled, right-click) or Click and hold on Trash icon, it will pop up the menu. Press Command key, then you’ll see “Secure Empty Trash” instead of regular “Empty Trash” menu.

Clicking on “Secure Empty Trash” will bring another dialog which will ask you whether you want to delete the data or not because it will completely erase the deleted files and will be gone forever.


How to prevent Chrome from downloading index files

I have been using Chrome as default browser for a while apart from using Firefox for web development. One thing I noticed is that Chrome downloads index files instead of displaying the page in some websites. There is a discussion on Chorme help forum shows that the problem is caused by Internet Download Manager (IDM). The solution is to opt-out the Chrome from Advanced browser integration under General tab in IDM Options. Just click Downloads->Options and under General tab, opt-out the Google Chrome. See the snapshot below.  I hope this help you too.


Reset scroll direction in OSX Lion

After you installed new version of OSX Lion, you’ll notice that mouse/touchpad scroll reversely when you scroll web pages and some apps like Launchpad. It look very weird for me first time and I have to disable it by going to Setting Preferences -> Mouse -> Point & Click and tick off Scroll direction: natural.

I have been testing this reverse feature and getting used to it now. You should try if you’re comfortable with it.

Ask the Google Talk Guru

I use Google talk to connect with my family and friends. Most of my friends are using Gmail as primary email so Google talk (IM and Web based) is their default IM for them as well. Sometimes I want to know something like today’s currency exchange rate i need to open up the browser and look up in Bloomberg.

Guru Google Talk Chat

Google Talk Guru is an experimental service that allows people to get information like sports results, weather forecasts, definitions etc via chat. It works on many popular chat applications that support Google Talk. To use Google Talk Guru, sign in with your Google account in Gtalk and add [email protected]. Now you can ask some information like sports results, translation, etc. Examples keywords are available in Google Talk Guru page.


How to see updates of all of your contacts in Facebook

I just noticed that I see only the status messages, links and photos from friends whom I know them personally in Facebook. I did not realize that it is the default set by Facebook until I read a note shared by my friend in Facebook. What Facebook does is that News Feed on your facebook account only shows the updates from your friends whom you’re interacted most. It means that you don’t see  any other updates from some of your contacts you never interacted.

Facebook newsfeed

To change this feature, scroll down to bottom of Facebook until you see “Edit Options” link. Click on it and you will see “Edit Your News Feed Settings” dialog box. Select “Show posts from” menu and change it as your personal choice.

How to download/backup your facebook profile

Have you ever wonder of how you can download or backup your facebook profile, status messages, links, photos and even messages that you shared with your friends in Facebook? Facebook has a feature that allows you to download all those information in zipped format which contains messages, status, links, photos and messages. Click Account upper right corner of your Facebook account. Go to Account Settings -> Download Your Information.

Download Facebook

For the first time, Facebook will ask you to wait for sometime and you will get email shortly which includes download link. Unzip the file, and browse index.html file with your browser. Now you can see your facebook profile locally with minimalist interface NOT Facebook interface.