Prior to purchasing a cert, you need to generate a private key, and a CSR file (Certificate Signing Request). You'll be asked for the content of the CSR file when ordering the certificate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
| <meta charset="utf-8"> | |
| <title>Simple markers</title> | |
| <style> | |
| html, body, #map-canvas { | |
| height: 100%; | |
| margin: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| import redis | |
| import random | |
| import pylibmc | |
| import sys | |
| r = redis.Redis(host = 'localhost', port = 6389) | |
| mc = pylibmc.Client(['localhost:11222']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func timeAgoSinceDate(date:NSDate, numericDates:Bool) -> String { | |
| let calendar = NSCalendar.currentCalendar() | |
| let now = NSDate() | |
| let earliest = now.earlierDate(date) | |
| let latest = (earliest == now) ? date : now | |
| let components:NSDateComponents = calendar.components([NSCalendarUnit.Minute , NSCalendarUnit.Hour , NSCalendarUnit.Day , NSCalendarUnit.WeekOfYear , NSCalendarUnit.Month , NSCalendarUnit.Year , NSCalendarUnit.Second], fromDate: earliest, toDate: latest, options: NSCalendarOptions()) | |
| if (components.year >= 2) { | |
| return "\(components.year) years ago" | |
| } else if (components.year >= 1){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // based on https://gist.github.com/samuel-mellert/20b3c99dec168255a046 | |
| // which is based on https://gist.github.com/szhernovoy/276e69eb90a0de84dd90 | |
| // Updated to work on Swift 2.2 | |
| func randomString(length: Int) -> String { | |
| let charactersString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | |
| let charactersArray : [Character] = Array(charactersString.characters) | |
| var string = "" | |
| for _ in 0..<length { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for familyName in UIFont.familyNames as [String] { | |
| print("\(familyName)") | |
| for fontName in UIFont.fontNames(forFamilyName: familyName) as [String] { | |
| print("\tFont: \(fontName)") | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension Float { | |
| var cleanValue: String { | |
| return self % 1 == 0 ? String(format: "%.0f", self) : String(self) | |
| } | |
| } | |
| Usage: | |
| var sampleValue: Float = 3.234 | |
| print(sampleValue.cleanValue) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ViewController.swift | |
| // TimeLapse | |
| // | |
| // Created by Yasin Aktimur on 29.08.2016. | |
| // Copyright © 2016 Yasin Aktimur. All rights reserved. | |
| // | |
| import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
| return 3 | |
| } | |
| func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { |