Jan 17, 2012

Recovering data from a zip file that won't expand.

Let me just point to this excellent article: Recover ZIP archives.

Sep 24, 2011

double forwarding through airport and internet sharing

http://www.soundc.de/blog/2009/01/24/mac-os-x-port-forwarding-with-internet-connection-sharing/

Aug 30, 2011

How to enable sub-calendars in google so they show up on your iphone.

There's a complete guide here: Guide to enable calendars on the iPhone

but it all boils down to this; enable the calendars here in the google sync control-panel: http://www.google.com/calendar/iphoneselect

Jul 24, 2011

TRIM enable for SSD's other than apples in LION

So TRIM? What the hell is that? Well, it's a technology that enables the operating system in a computer to keep the SSD (instead of a hard-drive) working fast an efficient by cleaning up the mess once in a while ... automatically. I know that makes little sense, but over time SSD's will turn slower and slower, unless the operating system supports TRIM which is like having a cleaning lady tidying up the order of things.

Unfortunately, unless your mac originally came with an SSD the new version of Mac OS X (Lion) will not support that, unless you do the following.

1. Open the terminal and backup some files first:

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original

2. Patch some files to add support for TRIM

sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x00\x00\x00\x00\x00\x00\x00\x00\x00$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

3. Clear the caches (two lines, each with a return)

sudo kextcache -system-prelinked-kernel

sudo kextcache -system-caches

4. Then reboot to see changes take effect.



If you wanna disable it again:

sudo perl -pi -e 's|(\x52\x6F\x74\x61\x74\x69\x6F\x6E\x61\x6C\x00).{9}(\x00\x51)|$1\x41\x50\x50\x4C\x45\x20\x53\x53\x44$2|sg' /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

sudo kextcache -system-prelinked-kernel

sudo kextcache -system-caches


And if you want to revert to your backup:

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage



Original post found here: http://digitaldj.net/2011/07/21/trim-enabler-for-lion/

Apr 16, 2011

How to check for bad blocks on a mac with Mac OS X?


In the olden days you could always check a hard drive for bad blocks using the built in tools, but no more since the dawn of Mac OS X, which is about a decade ago. Anyways, a good article here on bad blocks and a Terminal Tool that will actually allow the process of checking a disk gone haywire.

Link to article on bad blocks

Here's the gist of the article
The badblocks command will be installed in /usr/local/sbin/badblocks, and it will probably not be on your PATH, so you have to type the entire path when using, or edit your PATH environment variable.

Usage is simple. First, run the “mount” command, so that you know the device names for the drives you want to test. You can obtain something like this:

arroz% mount
/dev/disk0s3 on / (local, journaled)
devfs on /dev (local)
fdesc on /dev (union)
on /.vol
automount -nsl [142] on /Network (automounted)
automount -fstab [168] on /automount/Servers (automounted)
automount -static [168] on /automount/static (automounted)

The internal hard drive is /dev/disk0 (note that /dev/disk0 is the entire drive, /dev/disk0s3 is a single partition). Imagining you want to test the internal hard drive you would type the command (as root):

badblocks -v /dev/disk0



Here's the link to the tool: Download BadBlock Terminal Tool
And my personal mirror of it: Mirror of BadBlock Terminal Tool

Some things I noted was that it couldn't run a check on a disk mounted, so I unmounted the drive, and had to run the command in sudo. But other that it's a great little tool.

Feb 5, 2011

What do you do if you can't restart your MacBook air, and have no DVD drive to boot from?

Since I booted my DVD drive months and months ago to fit in another hard drive in its place, I have now no means to boot my computer if both hard drives fail. The solution is to create a memory stick with the installation of Snow Leopard for use in emergencies. Instead of me rambling on how to do this, another dude on the internet has a nice little guide on how to perform this operation. Except that his piece is about making the 6GB installer DVD down on a single layer DVD rather than a dual layer. But this works for memory-sticks too, in case you don't have one that can fit more than 4GB.

Instead of burning the disc image in the last step to a DVD, you'd simply carbon copy it to the memory stick. Remember to format the memory stick with a GUID partition scheme, in order to make sure that Intel Mac's can boot from it.

The guide can be found here:
http://tonymacx86.blogspot.com/2010/01/fit-mac-os-x-snow-leopard-on-single.html

What do you do if you can't restart your MacBook air, and have no DVD drive to boot from?

Since I booted my DVD drive months and months ago to fit in another hard drive in its place, I have now no means to boot my computer if both hard drives fail. The solution is to create a memory stick with the installation of Snow Leopard for use in emergencies. Instead of me rambling on how to do this, another dude on the internet has a nice little guide on how to perform this operation. Except that his piece is about making the 6GB installer DVD down on a single layer DVD rather than a dual layer. But this works for memory-sticks too, in case you don't have one that can fit more than 4GB.

Instead of burning the disc image in the last step to a DVD, you'd simply carbon copy it to the memory stick. Remember to format the memory stick with a GUID partition scheme, in order to make sure that Intel Mac's can boot from it.

The guide can be found here:
http://tonymacx86.blogspot.com/2010/01/fit-mac-os-x-snow-leopard-on-single.html