How to extract original kexts from OS X install image

If you accidentally delete or modify a kext this method will help you restore it. The easiest way is restore from TimeMachine backup.
If you do not have any backup...

1. Download the Mavericks image from App Store
2. Install Pacifist from CharlesSoft
3. Open with Pacifist:

/Applications/Install OS X Mavericks.app/Contents/SharedSupport/OSInstall.mpkg

4. Find and select Extensions folder:

Blog categories:  Unix admin

Change you uid bellow 1000 on Ubuntu 14.04

You need to login as root first in command line mode (CTRL+ALT+F1). If the root user has no password, use

sudo passwd root

to set new password.

This command chnages uid of youruser to 501:

usermod -u 501 youruser

This changes gid of youruser group to 501:

group mod -g 501 youruser

Only the first command changed your files uid in your home. So the best you can do is execute this command:

Blog categories:  Linux  Unix admin

Install Postgresql on Mac OS X

Here is the steps how you can install postgresql on Mac OS X:

1. install homebrew

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

2. install postgresql

brew install postgresql

3. set automatic start

ln -sfv /usr/local/opt/postgresql/*.plist ~/Library/LaunchAgents

4. initialize database cluster

Blog tags:  Mac OS X

When Gmail disallow mail client login

When you use email client (ThunderBird, Outlook, Outlook express) or any special app to connect to google mail imap or pop3 service you may run into one of these error messages:

  • [WEBALERT http://something-secret-url] Web login required.
  • NO failed: Re-Authentication Failure

These are tipical problem when you do not use Weblogin (https://gmail.com) on from the same IP.

Here is the solution:

Blog categories:  Linux

3gp or 3ga to mp3

We have already learned how to convert jpeg files to pdf on Linux. Now I am going to show you how you can convert .3ga or .3gp audio files to mp3 or ogg. Of course I use Ubuntu.

If you type in Google that "3gp to mp3 linux" thing, you found the ffmpeg command. That's OK. But somehow I cannot make this ffmpeg wokr on my Ubuntu. So I found another way to converting 3gp to mp3.


Gnac is an audio file converter application. You can install with

Blog categories:  Linux
Blog tags:  linux

How to disable chrome caching on Ubuntu?

I bought SSD drive to my laptop, so I decided to minimize write I/O on my system. The less writing is a good idea even you have a HDD. Your system become faster in this way.

There are some good starting point:

How to convert your real system to virtual machine?

I had a real Linux server system that I need to convert into virtual server, because I wanted to sell my old hardware, but I needed the system as backup. This backup is able to run as virtual server. This is a very useful backup method. This tutorial show you how you can convert your whole system into virtualbox system. Virtualbox is a free opensource virtual computer solution from Oracle.

1. Backup your system disk

If you can, put your system disk to another computer. But if you can't do it you can do it the original system.

HTTP AUTH logout method

This code cause logout feeling for your user. The browser will ask again the username and password.

  header('WWW-Authenticate: Basic realm="protected area"');
  header('HTTP/1.0 401 Unauthorized');

I use it with a logout controller, that set a session variable to true and redirect the request to the home page. And the home page check this session variable, and if it true, it sends these headers and set back the session variable to null.

Blog categories:  Web development