Snow Leopard: SpotLight

Filed in mac | software Leave a comment

a while back, i disabled spotlight cause the process mds was totally consuming too much ram.
with improved spotlight in snow leopard, i decided to give it a chance, but totally forget how to enable it back!
so here’s for the reference:

To turn Spotlight Indexing OFF in MAC OS X 10.6 Snow Leopard

sudo mdutil -a -i off

To turn Spotlight Indexing ON in MAC OS X 10.6 Snow Leopard

sudo mdutil -a -i on

Just type the respective command in terminal.
If this don’t help you may follow the instruction on the link in reference.

Reference: Spotlight won’t work?

, , , ,

Vacuuming iPhoto database

Filed in mac | software Leave a comment

with lots of photos events and album in iphoto, really need optimisation! vacuuming do helps quite a bit.

Inside the iPhoto Library Package, there are four SQLite databases (face_blob.db, face.db, iPhotoAux.db and iPhotoMain.db). I found that by vacuuming all four of these databases, I restored iPhoto ’09’s performance back to something on par with its predecessor.

Open Terminal and cd into your iPhoto Library (by default, cd “~/Pictures/iPhoto Library”). Once there, execute the following command:

for dbase in *.db; do sqlite3 $dbase “vacuum;”; done

Source: macosxhints : Speed up iPhoto ’09 by vacuuming its databases

iPhone: Hotmail on iPhone

Filed in iPhone | mac Leave a comment

apple just made hotmail on iphone even easier with iPhone OS 3.0!
have added the print screen and instructions on how to add.

Go to “Settings”, “Mail, Contacts, Calendars”,

Select “Add Account…” under Mail,

Select “Other”,

Choose “Add Mail Account”,

Enter your account info, note that address to be your full or address, as shown,
click on “Save” and the account will automatically be configure, setup and verified.

Once verified, you shall see the following information under your Hotmail account settings.

and you are good to go!, sadly, hotmail only have support for POP, lagging IMAP, meaning no synchronization. well, pretty microsoft.

then for those who wants to setup Hotmail on Apple Mail, i assume you are a proficient enough user to no need print screens, the information are as follows:
Incoming Server: (Port 995)
username: OR
Outgoing Server (SMTP Server): (Port 25)
Make sure SSL is checked, your outgoing port is 25 and authentication is required.

If anyone need a step by step with print screen, post in comments and i will add it in.

, , ,

Mac: Safe Sleep

Filed in mac Leave a comment

recently while scanning my harddisk with this awesome tool, OmniDiskSweeper from the Omni Group, i realise i have a 4GB file in “/var/vm” with the filename “sleepimage”, initially thinking it was a sleep image created by VMWare, which i use to run windows to debug ie, i deleted it, but it jus keep coming back! googling didn’t help much in figuring out what this file do and who created it until today!

that when i learnt about this hidden function of mac call Safe Sleep from MacWorld, is one very old article, but is very relevant, you can go over to macworld to read more, i am just going to record a few important points here.

to check current setting: (in terminal)

pmset -g | grep hibernatemode

the output will be something like:

hibernatemode 3

the 3 here indicates the mode, other mode incldues,
0 – Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake.
1 – Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
3 – The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically.
5 – This is the same as mode 1, but it’s for those using secure virtual memory (in System Preferences -> Security).
7 – This is the same as mode 3, but it’s for those using secure virtual memory.

my mac current mode is 3, and really i don’t really need safe sleep, so m gng to jus switch mine to 0.
in terminal again, type:

sudo pmset -a hibernatemode 0

alright, now in terminal again,

sudo rm /var/vm/sleepimage

4gb of hdd space recovered! imaging the new mac with 8gb of ram! gosh, that will be 8gb of hdd saved man!
but ok, if you ever lost power while in sleep mode, you lost everything! depends on how you weigh the importance.

Set newer portable Mac’s sleep mode
How to Quickly Sleep Your MacBook

, , , ,

Mac: Disk Utility, Format Fail

Filed in hardware | mac Leave a comment

I see a lot of post or google results when i try to google: “file system formatter fail”.
i got this error when i was trying to format my 1 Tera Maxtor HDD to be Mac OS Extended (Journaled), the problem here is, it a previously a MS-DOS(FAT) format. So the partition is actually Master Boot Record for booting into DOS or Windows based computer.
To solve this, you will realise you have gotten that extra “Partition” tab along with the “Repair”, “Erase”, “Raid”, “Restore” tabs. Go to that tab and then under the advance option, select your partition to be “GUID”.
And tada, you will be able to properly format your HDD to Mac OS Extended.

Quite dump on Disk Utility to not automatically resolve this problem.

, ,

Mac: Unlocking multiple file easily

Filed in mac Leave a comment

recently copied some files from windows drive into my mac and ended up with a lot of read-only files being locked.
is a pain to unlock that thousand over files to delete them! good i found this method

chflags -R nouchg <directory-name>

simply open terminal and type the above command in, it will recursively unlock all folders and files in that directory, the same goes if you are unlocking one file only:
chflags nouchg <dir-fileName>

, ,

Overcoming Gmail “All Mail” Folder in IMAP

Filed in gmail | mac 2 Comments

Wahoo! Google blog about this quite a while back and i didn’t realise it.
They have this new add-on currently experimental in their labs section, while gmail is still in beta, so almost everything is labs!

So the problem here is Gmail IMAP offer a very good means for almost everyone to sync their email in mail, iphone and thunderbird etc (outlook sucks in imap features, especially with gmail). BUT the “All Mail” label in gmail can get quite irritating when u start seeing duplicates emails in your “Inbox” and “All Mail” folder. and even more irritating when search produce 2 email of exact same thing from the 2 folders, of cos, there was recommendation like this to remove it from spotlight, but if your gmail account have 4gb of email, you are actually using 8gb to cache 4gb of your email.

So come “Advance IMAP Setting for Gmail”, simply go to “Settings” then under the “Labs” tab, search for:
Advance IMAP Controls

Enable it, and simply go to the “Filters” tab to exclude your “All Mails” label from showing in IMAP.

You can read more about this in google’s blog linked below.

Source: Google System Blog – Advanced IMAP Settings for Gmail

, , , , ,

emptying large log files

Filed in mac | software | unix Leave a comment

my apache error_log file was like getting over 400mb! and go googling to figure how to empty these error messages and found this!

# cat /dev/null > /private/var/log/apache2/error_log

that simple! and the error_log file is emptied.
simplest method, fast and easy way to empty any file


iPhone: Screen Capture on iPhone

Filed in iPhone Leave a comment

wow, quite impressive, i didn’t know i can do this!
i was pressing on the home button on the iphone when i accidentally hit the off button, and the screen goes into a flash. so i was like, what’s this!? my iphone was in the silent mode then, so today, i was bored and was trying to figure it out, it goes *click* jus like the sound mac will produce when u do a screen capture! and volia, it capture the screen and store it in the photos.

To capture screen in iPhone,
Press the Power button followed by the Home button, the screen will flash and volia, you have it in your photos.

iPhone: Backup while Sync-in

Filed in iPhone Leave a comment

to stop backing up when syncing iphone,

close itunes, and enter the following command into terminal.
defaults write DeviceBackupsDisabled -bool YES

to enable back, same thing, close itunes and enter the following command into terminal.
defaults write DeviceBackupsDisabled -bool NO

tat’s all folks