Changing osx root password

I hope this will never happen to you. But if you ever forgot your root password, then follow these steps to reset it. I cannot guarantee this method will work for all versions of osx, but it worked for me on my mac mini 1.5 GHz model at least.

  1. Hold Apple+S when booting, you will then enter the single user mode
  2. Run “/sbin/mount -uw /”. If you read through all the bootup comments it’s somewhere in there. It basically enables you to make changes to your hard drive.
  3. Run “passwd”. Then put in your new root password twice.
  4. Run “exit”. The reboot process should begin. You are done!

Maximizing an OSX window

This is often a frustrating experience to many new osx users, especially those who have used windows for many years. Often times I am ok with what the green zoom button does, coz it actually does make the current window bigger but just not maximized… Like most people, I settled with moving the window to the top left corner, then dragging the bottom right corner…

Today, while trying to look at a map in preview, for some reasons I just thought that there got to be something that can maximize an osx window right. There got to be! How many years has Apple been in business! There got to be!

After some googling, I found this tool called Right Zoom. It just does the maximizing correctly! It simply fills up the screen with the click of the green button.

In addition, if you like shortcuts, you can set one up as well. The default is Cmd+Opt+E. Good enough. I’m pleased.

Though to make this program run every time, you will need to add this to your “Login Items”. I am pretty sure you know how to do it.

This is a very under-publicized application, and it should deserve more public attention.

Check out the tutorial to this tool at http://www.switchingtomac.com/tutorials/make-the-os-x-maximize-button-work-like-windows/

Pulling from Git

Perhaps Git is still new, I couldn’t find any one-click solutions to simply pulling a copy from a git repository in osx. If you are new to git, and you are a osx user, and you just want to pull the latest code from a repository, you are at the right place. I will show you the quickest way to do just that.

1. First download git-osx-installer at http://code.google.com/p/git-osx-installer/
2. Install it (you will need root login). After that, you should have /usr/bin/git
3. Say you want to pull from git://github.com/omz/AppSales-Mobile.git
4. Make a directory, for example: mkdir myApp
5. cd myApp
6. At this point, you would want to do a “git clone git://github.com/omz/AppSales-Mobile.git”. However, I bet you will get some error messages. So read on. 😉
7. Type “locate git-core”, check to see that you have “/usr/local/git/share/git-core/templates/”.
8. Type “locate index-pack”, check to see that you have “/usr/local/git/libexec/git-core/git-index-pack”
9. Now, set the path: export PATH=/usr/local/git/libexec/git-core/:$PATH (or wherever git-index-pack is located at from step #8)
10. Issue this command: git clone --template=/usr/local/git/share/git-core/templates/ git://github.com/omz/AppSales-Mobile.git

This should probably save you some time googling around…

If you are doing more than just pulling code, you should probably add the path info into your bashrc file or so.