Monday, 5 December 2011

Update Your Retail Mac OS X Lion App to 10.7.2

The original installation media for Mac OS X Snow Leopard was a 10.6 DVD. The DVD was only updated once to version 10.6.3. In order to provide more frequent updates to users, Apple is now slipstreaming the latest version of Lion directly into the download. Upon fresh installation, no updating is necessary!

If you purchased Lion from the App Store prior to October 12, 2011, you have either 10.7.0 or 10.7.1. To re-download and update your App to 10.7.2, follow this simple procedure.

     1. Delete your existing copy of Install Mac OS X from Applications folder.
     2. Hold down the alt/option key on your keyboard, and click the App Store icon.
     3. With alt/option key held, click on Purchased
     4. With alt/option key held, click on OS X Lion
     5. With alt/option key held, click on Install

The Installed button should change to Install, allowing you to re-download Lion. When the download finishes, the app will automatically open. The updated 10.7.2 Install Mac OS X Lion App can be found in the Applications folder.

If this doesn't work for you, try creating a new User account. You can delete it later.

     1. Open System Preferences
     2. Click on Accounts
     3. Click Lock Icon
     4. Click (+) to add a new User
     5. Create a new Admin User
     6. Log out, and log into new User
     7. Proceed with steps above.

Sunday, 27 November 2011

How to save a FLASH or HTML5 video to your desktop

This little tip lets you save those HD videos from places like YouTube and Vimeo to your computer for later playback on your smartphones or tablets or any such devices.

This technique uses Safari. This won't work for other browsers. You can get Safari for FREE with iTunes.

What you will need


  1. Open up Safari and navigate to a video of your choice click here for example
  2. Press play and enjoy the video.
  3. Now comes the good bit, press cmd+alt+a (Mac) or windows+alt+a (windows pc)
  4. The activity window will pop up.
  5. Scroll down and look for the line " …"
  6. Now double click that line of text
  7. A window will open in safari
  8. Goto Safari's address bar and copy the video address
  9. Now open Quicktime
  10. Click on the menu bar and click on File > Open Location ..
  11. Paste the address you copied from step 8
  12. The video should start playing in Quicktime.
  13. Now click on the menu bar again and click on File > Export
  14. You will be asked for a filename and location to SAVE the file to.

Voila! you just saved a video file to your computer for playback later.

The YouTube Method

  1. Open up Safari and navigate to a video of your choice click here for example
  2. Press play and enjoy the video.
  3. Now comes the good bit, press cmd+alt+a (Mac) or windows+alt+a (windows pc)
  4. The activity window will pop up.
  5. Look for this line " … "
  6. Find the file with the largest filesize - this one is 30MB
  7. Double click that line
  8. This will open another window in Safari
  9. Copy the website address
  10. open Quicktime
  11. File > Open location and paste the address you copied in step 8
  12. The video will load in Quicktime
  13. File > Export and save the file to your computer


Wednesday, 13 July 2011

FreeNAS fix for AFP connection issues with OSX Lion

The problem
I tried to connect to my FreeNAS box with Apple MAC OSX Lion over the AFP protocol and got an error message..  

There was a problem connecting to the server

The version of the server you are trying to connect to is not supported. Please contact your system administrator to resolve the problem.

The Solution
Apple disables support for the “DHCAST128″ in OS X 10.7 LION , which is commonly used by NAS boxes. Apple thinks it is insufficiently secure. So all the Vendors must work with Apple for Lion compatibility. However there is a workaround. You simply turn on or enable, DHCAST128 in Lion. Heres how you do it ..

To turn on “DHCAST128″ in Mac OS X Lion:-
1)  Launch terminal /Applications/Utilities/Terminal and do:

  • sudo chmod o+w /Library/Preferences
  • defaults write /Library/Preferences/ afp_host_prefs_version -int 1
  • Now restart your computer.

2)  From Finder, select an AFP server, or use “Connect To…”.  This will cause the AFP Client to create the full preferences file
3)  Launch Terminal again and do:

  • sudo defaults write /Library/Preferences/ afp_disabled_uams -array “Cleartxt Passwrd” “MS2.0″ “2-Way Randnum exchange”
  • sudo chmod o-w /Library/Preferences
  • Now restart your computer.

Now try connecting to FreeNAS over AFP protocol - voila! all fixed. Until FreeNAS has been updated this workaround should be sufficient. I know it's less secure than Apple wants, but at the moment NAS boxes aren't ready for the enhanced security features of OS X Lion. I will be keeping an eye on the FreeNAS forum. When a fix has been released by the experts, I will update this post.

Note:  To add a “DHCAST128″ to the disable list, use
sudo defaults write /Library/Preferences/ afp_disabled_uams -array-add “DHCAST128″

Highlight code in blogger posts

I wanted a way to highlight code in my blog, I've seen it on other blogs and couldnt find it here in blogger pin the editor.

Heres how to make this work on blogger, do the following

  1. Download SyntaxHighlighter here
  2. Unzip and upload the following files to your webspace (googlepages is a great place)
    1. SyntaxHighlighter.css
    2. shCore.js'
    3. shBrushCpp.js (or whatever code you wish to use on your blog)
  3. Go to your Dashboard/Layout/Edit HTML
  4. Add the following code right after the tag

How to Reset iPad

If something isn’t working right, try restarting iPad, force quitting an application, or resetting iPad.

Restart iPad:

Press and hold the Sleep/Wake button until the red slider appears.
Slide your finger across the slider to turn off iPad.
To turn iPad back on, press and hold the Sleep/Wake until the Apple logo appears.

Force quit an application:

Press and hold the Sleep/Wake button on top of iPad for a few seconds until a red slider appears, then press and hold the Home button until the application quits.

If you can’t turn off iPad or if the problem continues, you may need to reset iPad.
This should be done only if turning iPad off and on doesn’t resolve the problem.

Reset iPad:
Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears.

iPad Still Doesn’t Respond After Reset
Reset iPad settings. From the Home screen choose Settings : General : Reset : Reset All Settings. All your preferences are reset, but your data and media aren't deleted.

Resetting iPadReset all settings: Choose General > Reset, then tap Reset All Settings.

All your preferences and settings are reset. Information, such as your contacts and calendars, and media, such as your songs and videos, aren’t deleted.

Erase all content and settings: Choose General : Reset  then tap “Erase All Content and Settings.” This resets all settings to their original values and erases all your information and media.

Reset network settings: Choose General : Reset, then tap Reset Network Settings.

When you reset network settings, your list of previously used networks and VPN settings not installed by a configuration profile are removed. Wi-Fi is turned off and then back on, disconnecting you from any network you’re on. The Wi-Fi and “Ask to Join Networks” settings remain turned on. To remove VPN settings installed by a configuration profile, choose Settings > General : Profile, then select the profile and tap Remove.

Reset the keyboard dictionary: Choose General > Reset, then tap Reset Keyboard Dictionary.

You add words to the keyboard dictionary by rejecting words iPad suggests as you type. Tap a word to reject the correction and add the word to the keyboard dictionary. Resetting the keyboard dictionary erases all words you’ve added.

Reset the Home screen layout: Choose General > Reset, then tap Reset Home Screen Layout.

Reset the location warnings: Choose General > Reset, then tap Reset Location Warnings.

Location warnings are the requests made by applications (such as Maps) to use Location Services with those applications. iPad stops presenting the warning for an application the second time you tap OK. Tap Reset Location Warnings to resume the warnings.

Updating and Restoring iPad Software

About Updating and Restoring Software

You can use iTunes to update or restore iPad software. If you update, the iPad software is updated. Your downloaded applications, settings, and data aren’t affected.
Note: In some cases, an update may also include restoring iPad. If you restore, the latest version of iPad software is reinstalled, settings are restored to their defaults, and all data stored on iPad is deleted, including downloaded applications, songs, videos, contacts, photos, calendar information, and any other data. If you’ve backed up iPad with iTunes on your computer, you can restore data from the backup at the end of the restore process.
Deleted data is no longer accessible through the iPad user interface, but isn’t erased from your iPad.
Updating iPad

Make sure your computer has an Internet connection and that you’ve installed the latest version of iTunes from Apple website
Update iPad:

1 Connect iPad to your computer.
2 Select iPad in the iTunes sidebar, then click the Summary tab.
3 Click “Check for Update.” iTunes tells you if there’s a new version of the iPad software available.
4 Click Update to install the latest version of the software
iPad recovery mode

With the iPad powered off, press and hold the Home button, connect the USB cable from PC/Mac to iPad.
Continue holding the Home button until you see the "Connect to iTunes" screen, then release the Home button.
Open up iTunes to see iPad in recovery mode.

How to secure your FreeNAS server

Quote from FreeNAS forum:

Q: How do I make sure my FreeNAS server is secure?
A: You can ensure basic security by following the FreeNAS Security Checklist:
  1. Change the WebGUI admin/root password (the default is: freenas)
    Use a very strong password if you intend to access FreeNAS over the Internet.
    Please note - admin/root accounts use the same password.
    Please note - Users that are members of the wheel group can su to root if they know the root password.
  2. Change WebGUI admin user name (the default is admin), to protect your system against dictionary attacks.
  3. DO NOT give shell access to everybody.
  4. DO NOT use FTP over the Internet, use SSH or SFTP instead.
  5. DO NOT enable Password Authentication with SSH, set-up and use SSH key based authentication.
  6. Always use https protocol to access WebGUI interface.
  7. DO NOT open your WebGUI server to internet, rather open a tunnel via SSH from client to server.
 Let's start from the first item:

1. Change the WebGUI admin password under System | General | Password:

2,4. Change WebGUI admin user name and access protocol under System | General:

5,7. SSH setup under Services | SSH:

Of course, you need to create a non-admin user, create SSH key, and upload it to FreeNAS server. Please read SSH manual. If your FreeNAS server is behind a router, you also need to setup the router's NAT:

Here I opened both WebGUI interface and SSH to Internet, but I will use only SSH to connect. To do SSH tunneling from Linux box, type:

$ ssh -v -p 22 -L 8888:localhost:443 username@your.FreeNASorRouter.IP.address

Then open your web browser and type address https://localhost:8888/ and you are there. Windows users can read the instruction in FreeNAS KnowledgeBase.

I don't have a static IP address, so I use (free) DynDNS service.

Last word:

To eliminate Windows users' advantage of using shortcut Linux users can create an alias:

$ cat .bashrc
alias ssh-nas="ssh pvt@"
alias ssh-dir="ssh pvt@"
alias tunnel-nas="ssh -v -p 22 -L 8888:localhost:443"
# sudo alias
alias apt-update="sudo apt-get update"
alias apt-install="sudo apt-get install"
alias apt-remove="sudo apt-get remove"
alias mount="sudo mount"
alias umount="sudo umount"
alias suvim="sudo vim"

$ tunnel-nas