- Kenneth Geisshirt - Unleashing your inner Console Cowboy - Slides
- Hack Day - Hacking Cloud Kit and iOS 8 extensions - Slides
- Mike Ash - Swift and C - Playground
const Page = require('puppeteer/lib/Page'); | |
// the following 2 methods are originally from: https://github.com/GoogleChrome/puppeteer/issues/85#issuecomment-341743259, with some modification to fit puppeteerv1.0.0 | |
async function newPageWithNewContext(browser) { | |
const { browserContextId } = await browser._connection.send('Target.createBrowserContext'); | |
const { targetId } = await browser._connection.send('Target.createTarget', { url: 'about:blank', browserContextId }); | |
const target = await browser._targets.get(targetId); | |
const client = await browser._connection.createSession(targetId); | |
const page = await Page.create(client, target, browser._ignoreHTTPSErrors, browser._appMode, browser._screenshotTaskQueue); | |
page.browserContextId = browserContextId; |
templates: | |
movies: | |
set: | |
path: /tmp/mnt/94E8B2B1E8B290CA/Torrents/download/DLNA/Movies | |
transmission: | |
host: ************ | |
port: **** | |
username: ************* | |
password: ************* | |
email: |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Localize.py - Incremental localization on XCode projects | |
# João Moreno 2009 | |
# http://joaomoreno.com/ | |
# Modified by Steve Streeting 2010 http://www.stevestreeting.com | |
# Changes | |
# - Use .strings files encoded as UTF-8 |
import UIKit | |
// The marshal operator is reviewed in this blog post… | |
// http://ijoshsmith.com/2014/07/05/custom-threading-operator-in-swift/ | |
// Don't ever do something this ridiculous in a real app! | |
func printMarshalOperator() | |
{ | |
{p("M")} |
import Foundation | |
/// An abstract class that makes building simple asynchronous operations easy. | |
/// Subclasses must implement `execute()` to perform any work and call | |
/// `finish()` when they are done. All `NSOperation` work will be handled | |
/// automatically. | |
open class AsynchronousOperation: Operation { | |
// MARK: - Properties |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
extension Array { | |
func first() -> Element? { | |
if isEmpty { | |
return nil | |
} | |
return self[0] | |
} | |
func last() -> Element? { |
var total : Int | |
let myString = "foo" | |
// When originally looking at Swift's switch statements, you may think this is how you get fall through behaviour: | |
total = 0 | |
switch myString { | |
case "foo": | |
total += 4 | |
case "foo", "bar": | |
total += 2 |
// | |
// HWKViewController.m | |
// HardwareKeyboardUI | |
// | |
// Created by Steven Troughton-Smith on 13/11/2013. | |
// Copyright (c) 2013 High Caffeine Content. All rights reserved. | |
// | |
#import "HWKViewController.h" |