Friday, July 17, 2015

Swift - Interactive playgrounds

Swift. A modern programming language that is safe, fast, and interactive.


Interactive Playgrounds

Playgrounds make writing Swift code incredibly simple and fun. Type a line of code and the result appears immediately. You can then Quick Look the result from the side of your code, or pin that result directly below. The result view can display graphics, lists of results, or graphs of a value over time. You can open the Timeline Assistant to watch a complex view evolve and animate, great for experimenting with new UI code, or to play an animated SpriteKit scene as you code it. When you’ve perfected your code in the playground, simply move that code into your project.
And new in Xcode 7, playgrounds can contain comments that use rich text with bold, italic, and bullet lists in addition to embedded images and links. You can even embed resources and supporting Swift source code in the playground to make the experience incredibly powerful and engaging, while the visible code remains simple. Playgrounds let you:
  • Share curriculum to teach programming with beautiful text and interactive code.
  • Design a new algorithm and watch its results every step of the way.
  • Create new tests and verify they work before promoting into your test suite.
  • Experiment with new APIs to hone your Swift coding skills.
  • Turn your experiments into documentation with example code that runs within the playground.
Read-Eval-Print-Loop (REPL). The LLDB debugging console in Xcode includes an interactive version of the Swift language built right in. Use Swift syntax to evaluate and interact with your running app, or write new code to see how it works in a script-like environment. Available from within the Xcode console or in Terminal.

Learn More: https://developer.apple.com/swift/#playgrounds

Manage Apple Music Membership

Join on your Mac or PC

  1. Open iTunes. Make sure that you have the latest version.
  2. In the upper-left corner, click the Music   icon.
  3. From the top of iTunes, click For You.
  4. Click Start 3-Month Free Trial.
  5. Select Individual or Family membership, then click Next.
  6. If prompted, enter your Apple ID and password that you use with the iTunes Store. If you don't have an Apple ID, click Create Account.
  7. You might be asked to validate your billing info. After you add a payment method, click Join. You can use store credit to pay for your Apple Music membership, but you must have enough store credit for your first renewal.
  8. If prompted, agree to the terms and conditions.

More details wise.
  1. Open iTunes.
  2. Click Sign In and enter your Apple ID.
  3. Click your name, and select Account Info from the menu.
  4. Enter your password again.
  5. On the Account Information screen:
    1. Scroll to the Settings section. 
    2. To the right of Subscriptions, click Manage. If you have more than one subscription, then click Edit to the right of Your Membership (Apple Music Membership). 
    3. To the right of Automatic Renewal, select Off. When asked to confirm, click Turn Off.
    4. Click Done to return to Account Information, and then click Done to return to the iTunes Store.
On your iPhone, iPad, or iPod touch:
  1. In Settings, tap Music.
  2. Turn on Show Apple Music.
  3. Tap Join Apple Music.
  4. Tap the For You tab, and then tap Start 3-Month Free Trial. 

Visit: https://support.apple.com/en-us/HT204939

Saturday, January 10, 2015

Terminal Commands

cd

change directory

chown

change ownership

chmod

change permission modifiers

cp

copy a file or directory

sudo

DANGER! become super user root DANGER!

xargs

execute arguments

exit

exit the shell

export

export/set a new environment variable

find

find files

grep

find things inside files

apropos

find what man page is appropriate

ls

list directory

env

look at your environment

mkdir

make directory

mv

move a file or directory
                    hostname
my computer's network name

less

page through a file

popd

pop directory

echo

print some arguments

cat

print the whole file

pwd

print working directory

pushd

push directory

man

read a manual page

rmdir

remove directory

Friday, November 28, 2014

How to mount an AirPort Extreme USB hard disk volume in Mac OS X and Windows

This article explains how to mount an AirPort Extreme USB hard disk volume in Mac OS X and Windows.
Typically, when a USB disk is connected to an AirPort Extreme Base Station (802.11n), it will automatically become available to users of the network. However, if that option is disabled in AirPort Disk Utility (Mac OS X) or AirPort Disks (Windows), or the network user declines, it can still be accessed using any of appropriate steps below. By default, a user can access the AirPort Extreme Base Station (802.11n) over IP by entering the IP address 10.0.1.1. 
If you are unsure of the IP address of your AirPort Extreme (802.11n), use AirPort Utility (Mac OS X) or AirPort Disks (Windows) to select your base station. You will see its IP address in the main window.
Note: AirPort Disk Utility is located in the Utilities folder in the Applications folder on a Mac; AirPort Disks is located in Start > All Programs > AirPort on a computer using Microsoft Windows. Open it, or click the AirPort Disk menu bar icon ( ) in Mac OS X, then select the AirPort Extreme Base Station (802.11n) to which the USB hard drive is connected.

Mac OS X

Automatically mounting hard disks
  1. From the main window of AirPort Disk Utility enable "Show AirPort Disks in the menu bar".
  2. Enter the username and password required to access the AirPort Disk(s).
Manually mounting hard disks using the AirPort Disk menu bar item
  1. Click the AirPort Disk menu bar icon ( ) and select the Base Station with desired USB hard drive.
  2. Select the desired hard disk(s) (AirPort Disk).
  3. Enter the username and password required to access the AirPort Disk(s).
Manually mounting Mac OS Extended (HFS+) volumes
  1. From the Finder's Go menu choose Connect to Server.
  2. Enter the AirPort Extreme Base Station's LAN IP address (by default 10.0.1.1).
  3. Enter the username and password required to access the AirPort Disk(s).
  4. Select the desired AirPort Disk(s) from the available Volumes.
Manually mounting FAT16/FAT32 volumes
  1. From the Finder's Go menu choose Connect to Server.
  2. Enter the AirPort Extreme Base Station's LAN IP address preceded by smb:// (for example, smb://10.0.1.1 )
  3. Enter the username and password required to access the AirPort Disk(s). Leave the Workgroup field empty unless you have assigned one in AirPort Utility.
  4. Select the desired AirPort Disk from the available CIFS (Common Internet File System) volumes

Windows XP and Vista

Note: With AirPort Base Station Update 2007-002 or later, AirPort Disk Agent has been renamed to AirPort Base Station Agent. If you have not installed this update yet, substitute AirPort Disk Agent for AirPort Base Station Agent in the steps below.
Mounting using AirPort Base Station Agent
  1. Launch the AirPort Base Station Agent from C:\\Program Files\AirPort\
  2. Ensure that the task bar menu is enabled from AirPort Disks
  3. Click the AirPort Base Station Agent icon in the Taskbar
  4. Enter the user name and password
Mounting by mapping a Network Drive
  1. Go to My Computer (Start > My Computer)
  2. From the menu, pull down Tools and select "Map Network Drive"
  3. Enter a drive letter that is not in use (for example, "Z")
  4. Enter the path to the drive. This is formatted as: \\IPaddress\drivename (for example, \\10.0.1.1\mydrive)
Mounting using Server Connection
  1. Select Start > Run and enter the IP address of the AirPort Extreme Base Station (802.11n). (by default \\10.0.1.1)
  2. When prompted, enter a username and password
  3. A window will open containing folders for each hard drive connected to the AirPort Extreme Base Station (802.11n)
Important: Information about products not manufactured by Apple is provided for information purposes only and does not constitute Apple’s recommendation or endorsement. Please contact the vendor for additional information.

Ref: http://support.apple.com/en-us/HT1331

Thursday, November 27, 2014

Find My Mac include Activation Lock

Find My iPhone Activation Lock

Find My iPhone includes a feature called Activation Lock that is designed to prevent anyone else from using your iPhone, iPad, or iPod touch if it's ever lost or stolen. Activation Lock is enabled automatically when you turn on Find My iPhone on a device using iOS 7 or later.
With Find My iPhone Activation Lock, your Apple ID and password will be required before anyone can:
  • Turn off Find My iPhone on your device
  • Erase your device
  • Reactivate and use your device
This can help you keep your device secure, even if it's in the wrong hands, and can improve your chances of recovering it. Even if you erase your device remotely, Activation Lock can continue to deter anyone from reactivating your device without your permission. All you need to do is keep Find My iPhone turned on, and remember your Apple ID and password.
Here are answers to frequently asked questions about Find My iPhone Activation Lock.

How does Activation Lock work?

When you enable Find My iPhone on your iPhone, iPad, or iPod touch, your Apple ID is securely stored on Apple’s activation servers and linked to your device. From that point on, your password will be required before anyone can turn off Find My iPhone on your device, erase your device, or reactivate and use your device.
Activation Lock is enabled automatically when you use Find My iPhone on a device using iOS 7 or later.
To turn on Find My iPhone on your device:
  1. Tap Settings.
  2. Tap iCloud.
  3. Sign in with your Apple ID, if necessary.
  4. Turn on Find My iPhone.

What steps should I take if I misplace my device?

If you ever misplace your device—whether it’s just lost or you think it may have been stolen—you should put it into Lost Mode immediately using Find My iPhone.
Lost Mode locks your screen with a four-digit passcode and lets you display a custom message with your phone number to help you get it back. You can also remotely erase your device if needed, and your custom message will continue to display even after the device is erased.
While Activation Lock works in the background to make it more difficult for someone to use or sell your missing device, Lost Mode clearly indicates to anyone who finds your device that it still belongs to you and can’t be reactivated without your password.
To put a device into Lost Mode, sign in to icloud.com/find from a Mac or PC or use the Find My iPhone iOS app.
For more information, read what to do if your device is lost or stolen

Do I need to turn off Find My iPhone before giving away my device?

Yes. Before giving your device to someone else, always turn off Find My iPhone to ensure that the other person will be able to activate and use the device normally. The best way to do this is to erase all content and settings from your device before handing it over. This will completely erase your device, turn off Find My iPhone, and remove the device from your iCloud account. On your iOS device, go to Settings > General > Reset > Erase All Content and Settings.

Do I need to turn off Find My iPhone before having my device serviced?

Yes. If Find My iPhone isn't turned off, technicians may not be able to perform service on your device.

What if I forget my Apple ID password?

If you forget your password, you can reset it at My Apple ID (appleid.apple.com) or by contacting Apple Support and verifying your identity.
If you forget your password and cannot reset it, you will lose access to your Apple ID and may be unable to use or reactivate your device. To help prevent this, visit My Apple ID periodically to review and update your account information.

What if I purchase a device that is still linked to the previous owner's account?

Contact the previous owner as soon as possible and ask them to erase the device and remove it from their account. Learn how to remove a device from a previous owner's account.

How do I check for Activation Lock before purchasing a used device?

When purchasing an iPhone, iPad, or iPod touch from someone other than Apple or an authorized Apple reseller, it is up to you to ensure that the device has been erased and is no longer linked to the previous owner’s account.
You can check the current Activation Lock status of a device by visiting icloud.com/activationlock from any Mac or PC.
Or you can follow the steps below to make sure that you can use the device you purchase:
  1. Turn the device on and slide to unlock.
  2. If the passcode lock screen or the Home screen appears, the device hasn't been erased. Ask the seller to completely erase the device by going to Settings > General > Reset > Erase All Content and Settings. Don't take ownership of any used iPhone, iPad, or iPod touch until it's been erased.
  3. Begin the device setup process.
  4. After choosing a language, choosing a country, and connecting to a network, the device will begin activation. If you're asked for the previous owner’s Apple ID and password, the device is still linked to their account. Hand the device back to the seller and ask them to enter their password. If the previous owner isn't present, they can remove the device from their account by signing in to icloud.com/find. Don't take ownership of any used iPhone, iPad, or iPod touch until it has been removed from the previous owner’s account.
You will know that a device is ready for you to use when you're asked to “Set up your iPhone," “Set up your iPad," or “Set up your iPod” during the device setup process.

Does Find My Mac include Activation Lock?

Activation Lock works only with iPhone, iPad, or iPod touch devices using iOS 7 or later.