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> | |
<style> | |
body { | |
margin: 0px; | |
padding: 0px; | |
} | |
</style> | |
</head> |
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 | |
// ShareTest | |
// | |
// Created by A J LEVINGS on 24/07/2016. | |
// Copyright © 2016 Gylphi. All rights reserved. | |
// | |
import UIKit | |
let UIActivityTypeOpenIn = "OpenIn" |
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
class UIScrollingStackView:UIScrollView { | |
private let stack = UIStackView() | |
var spacing:CGFloat { | |
get { | |
return stack.spacing | |
} | |
set { | |
stack.spacing = newValue | |
} | |
} |
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 IntegerType { | |
public func toBase(b:Int) -> String | |
{ | |
guard b > 1 && b < 37 else { | |
fatalError("base out of range") | |
} | |
let digits = ["0","1","2","3","4","5","6","7","8","9","A", | |
"B","C","D","E","F","G","H","I","J","K","L", | |
"M","N","O","P","Q","R","S","T","U","V","W", | |
"X","Y","Z"] |
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
// a regular method that doesn't have any arguments | |
func regularClosure(str:() -> String) { | |
str() | |
} | |
regularClosure{"print me!"} | |
// can be replaced with an @autoclosure | |
func autoClosure(@autoclosure str:() -> String) { | |
str() | |
} | |
autoClosure("print me!") |
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
// a translation of the Java implementation provided here: https://en.wikipedia.org/wiki/Base64 | |
let CODES = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" | |
func base64Encode(u:[Int]) -> String { | |
var out = "" | |
var b = 0 | |
var i = 0 | |
while i < u.count { | |
b = (u[i] & 0xFC) >> 2 | |
out.append(CODES[CODES.startIndex.advancedBy(b)]) | |
b = (u[i] & 0x03) << 4 |
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
{ | |
"version": "1.1", | |
"identifier": "sketchyTech_Demo", | |
"title": "My First Article", | |
"language": "en", | |
"layout": {}, | |
"components": [{ | |
"role": "title", | |
"text": "My First Article", | |
"textStyle": "titleStyle", |
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
{ | |
"version": "1.4", | |
"identifier": "sketchyTech_Demo", | |
"title": "My First Article", | |
"language": "en", | |
"layout": { | |
"columns": 3, | |
"width": 1024, | |
"margin": 30, | |
"gutter": 20 |
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/python | |
import requests | |
import base64 | |
from hashlib import sha256 | |
import hmac | |
from datetime import datetime | |
channel_id = '[YOUR CHANNEL ID]' | |
api_key_id = '[YOUR CHANNEL KEY]' | |
api_key_secret = '[YOUR SECRET KEY]' |
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
{ | |
"version": "1.1", | |
"identifier": "sketchyTech_Demo", | |
"title": "My First Article", | |
"language": "en", | |
"layout": {}, | |
"components": [{ | |
"role": "title", | |
"text": "My First Article", | |
"textStyle": "titleStyle" |