Sunday, May 25, 2014

Mac: AppleIntelCPUPowerManangement Kernel Panic

Mac: AppleIntelCPUPowerManangement Kernel Panic
After upgrading from Mac OS X Mavericks 10.9.2 to 10.9.3, my machine (HP Probook 4530s) ran into AppleIntelCPUPowerManangement Kernel panic, and to my surprise none of the boot flags helped me to boot into the system.
I decided to do a fresh install, but even booting from USB resulted the same. Then I decided to remove AppleIntelCPUPowerManangement.kext, but I can't even access terminal.

Here's the solution:
My machine dual boots Windows and Mac.

  1. I logged into Windows
  2. Installed MacDrive, trial version
  3. Rebooted into windows and opened the drive on which Mac is installed
  4. Did two things, don't know which one helped:
Opened /Extra/org.chameleon.Boot.plist with a text editor and added the following code:
And deleted AppleIntelCPUPowerManangement related kexts from this directory:
I found two kext folders related to it and deleted both.

Rebooted without any boot flags and voila. It worked.

Thursday, May 22, 2014

Mac: Access Mac formatted (HFS+) disks from Windows

Mac: Access Mac formatted (HFS+) disks from Windows Mac: Access Mac formatted (HFS+) disks from Windows
Recently I found a very easy and useful tool to access devices (USB, HDD, in-fact drive on which Mac OSX is installed), from windows.

Once you install MacDrive, it will reboot and all the drives which are Mac-formatted will be mounted alongside the Windows partitions.
Having said that, there is a BIG problem. ITS NOT FREE. But, you can use the trial version, when in need.

Sunday, May 18, 2014

Ubuntu: Directory size from terminal

Ubuntu: Directory size from terminal

In this post we gonna see how to find size of a directory from Terminal. To summarise disk usage of each file, recursively for directories, we can use the following command
du [option]... [FILE/Directory]...
To get the report in human readable format, along with the overall summary, use
du -hs /path/to/directory

To find sizes of directories recursively unto a certain depth (e.g.: depth = 2):
du -h --max-depth=2 /path/to/directory

Friday, May 9, 2014

Ubuntu: Proxy settings for Maven

Ubuntu: Proxy settings for Maven
Recently I faced problem using maven under a proxy network and by little research, found this solution.
Temporary solution:
Add the following options along with your maven command
-DproxySet=true -DproxyPort=3128
For example, to run "mvn package":
mvn -DproxySet=true -DproxyPort=3128 package

Permanent solution:
To add the proxy settings permanently, goto {M2_HOME}/conf/settings.xml and find the <proxies> section. Un-comment the required sections and configure accordingly.
To set proxy without password protection, change it as follows:
Change the words in italic format.

Sunday, May 4, 2014

Ubuntu: Recent command history (terminal)

Ubuntu: Recent command history (terminal)
Hello guys,
In this post I'm gonna show you "How to display and play with a list of recent commands in Ubuntu?".
To check history of command or to get info about command executed by user, we can use the following command:
It will display the list of all the command executed, along with a serial number indiacating the oerder in which they are executed.

Now you may feel it dificult to find a specific command among them. In order to do so, we can combine the history with grep.
history | grep version
This will display a list of command in which the word "version" has appeared.

We can also execute a specific command by knowing its serial number from this list. After getting the result from history command, just type the number preceeded by ! to execute the command. To execute command which is at number 115 in the list, just type
It will run the 115th command in the history list.

To re-run a recent command that starts with xyz, just type !xyz.
It may display the recent history, if no other command would have been executed after recent history command.

And the most commonly used reverse search:
Ctrl + R
After typing this command, type a keyword to search. When you found your command, just press enter.