Skip to content

Instantly share code, notes, and snippets.

@rgabbard
rgabbard / iOS Simulator Device.scpt
Created August 24, 2011 15:03
AppleScript to set the active device type when the iOS Simulator launches
set selectedDevices to choose from list {"iPhone", "iPhone (Retina)", "iPad"} with prompt "Choose device type:" default items {"iPhone"} without multiple selections allowed
if selectedDevices is not false then
set selectedDevice to item 1 of selectedDevices as string
set thePListFolderPath to path to preferences folder from user domain as string
set thePListPath to thePListFolderPath & "com.apple.iphonesimulator.plist"
tell application "System Events"
tell property list file thePListPath
tell contents
set value of property list item "SimulateDevice" to selectedDevice
@rgabbard
rgabbard / GPointGenerator.html
Created March 31, 2011 15:41
Point generator for Google Map routes
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Utility to generate points along a route using the Google Maps API
Directions service.
2011-03-31 Rob Gabbard, cintimedia LLC, www.cintimedia.com
Based on the Google Maps API Optimized Directions demo at: