Skip to content

Instantly share code, notes, and snippets.

Tony Edwards tonyedwardspz

Block or report user

Report or block tonyedwardspz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tonyedwardspz / dates.swift
Created Aug 4, 2015
Swift Dates plyground
View dates.swift
var date = NSDate()
var yesterday = date.dateByAddingTimeInterval(-24 * 60 * 60)
var dateComparisonResult: NSComparisonResult =
if dateComparisonResult == NSComparisonResult.OrderedAscending {
println("date is smaller than yesterday")
} else if dateComparisonResult == NSComparisonResult.OrderedDescending {
println("date is larger than yesterday")
} else {
View gist:4dac941e159bfebca391
"_id": "1",
"name": "10 Downing Street",
"latitude": 51.5033630,
"longitude": -0.1276250
"_id": "2",
"name": "Houses of Paliment",
tonyedwardspz / gist:c90a34627c7d536f7f3f
Last active Aug 29, 2015
Metadata tutorial from
View gist:c90a34627c7d536f7f3f
func imagePickerController(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]){
imagePicker.dismissViewControllerAnimated(true, completion: nil)
var selectedImage = info[UIImagePickerControllerOriginalImage] as! UIImage
var metadata: NSDictionary
var library:ALAssetsLibrary? = ALAssetsLibrary()
// Get the images meta data
if(picker.sourceType == .Camera) {
metadata = info[UIImagePickerControllerMediaMetadata] as! NSDictionary
tonyedwardspz / index.html
Created Jan 29, 2015
Offline ToDo list web app tutorial - Part 1
View index.html
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Offline todo app</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel='stylesheet' href="style.css" type='text/css' media='all' />
You can’t perform that action at this time.