Add VisibleTouch.swift
to your project then replace window
instance variable declaration in AppDelegate.swift
file:
var window: UIWindow?
with:
var window: UIWindow? = VisibleTouch.Window(frame: UIScreen.main.bounds)
import * as React from 'react' | |
import { Component } from 'react' | |
import { PaperScope } from 'paper' | |
export class PaperSetup extends Component<any, any> { | |
constructor(props) { | |
super(props) | |
window['paper'] = new PaperScope() | |
} |
import Foundation | |
// Extension allowing enum of Notification.Names. | |
#if swift(>=3.0) | |
extension Notification.Name: ExpressibleByStringLiteral { | |
public init(stringLiteral value: String) { | |
self.init(value) | |
} |
import * as AWS from 'aws-sdk' | |
// extend S3 class via interface. | |
// could not get class augmenting to work in time. maybe not be possible even. | |
declare interface S3Extended extends AWS.S3 { | |
// missing methods | |
headBucket(params: any, callback?: (err: Error, data: any) => void): any; | |
createBucket(params: any, callback?: (err: Error, data: any) => void): any; | |
getBucketPolicy(params: any, callback?: (err: Error, data: any) => void): any; | |
putBucketPolicy(params: any, callback?: (err: Error, data: any) => void): any; | |
getBucketCors(params: any, callback?: (err: Error, data: any) => void): any; |
var path = require('path'); | |
var url = require('url'); | |
var request = require('request'); | |
var WebClient = require('@slack/client').WebClient; | |
var token = process.env.SLACK_API_TOKEN || ''; | |
var web = new WebClient(token); | |
var s3Url = 'https://testbucket.s3-us-west-2.amazonaws.com/some/file/in/S3.mp4'; | |
var s3Stream = // from s3.GetObject call |
var path = require('path'); | |
var url = require('url'); | |
var request = require('request'); | |
var WebClient = require('@slack/client').WebClient; | |
var token = process.env.SLACK_API_TOKEN || ''; | |
var web = new WebClient(token); | |
var fileUrl = 'http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4'; | |
var fileName = path.basename(url.parse(fileUrl).pathname); |
const Async = require('async') | |
const AWS = require('aws-sdk') | |
const UUID = require('node-uuid') | |
const config = require('./config') | |
class S3 { | |
constructor(options = {}) { | |
if (!options.accessKey) throw new Error('required S3 accessKey missing'); | |
if (!options.secretKey) throw new Error('required S3 secretKey missing'); |
export function listenOnce(target, type, listener, options) { | |
let once = (e) => { | |
target.removeEventListener(type, once, options) | |
listener(e) | |
} | |
target.addEventListener(type, once, options) | |
} | |
export function listenAnyOnce(target, types, listener, options) { | |
let once = (e) => { |
export function bindMethods(obj, filter) { | |
if (obj) { | |
for (let name of Object.getOwnPropertyNames(Object.getPrototypeOf(obj))) { | |
let value = obj[name] | |
if (typeof value === 'function' && filter(name, value)) { | |
obj[name] = value.bind(obj) | |
} | |
} | |
} | |
} |
{"kty":"OKP","crv":"Ed25519","d":"nWGxne_9WmC6hEr0kuwsxERJxWl7MmkZcDusAxyuf2A","x":"11qYAYKxCrfVS_7TyWQHOg7hcvPapiMlrwIaaPcHURo"} |