Install the two dependencies, ImageMagick and Ghostscript.
$ brew install imagemagick
$ brew install ghostscript
import Foundation | |
/// A type representing an concrete part of an application, such that it can be | |
/// identified in logs. | |
/// | |
/// A typical use is as a nested type: | |
/// | |
/// extension MyViewController { | |
/// enum Log: Error { | |
/// case user |
// | |
// Channel.swift | |
// Sessions | |
// | |
// Created by Robert Widmann on 2/27/17. | |
// Copyright © 2017 TypeLift. All rights reserved. | |
// | |
enum FakeError : Error { | |
case Error |
// See also https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/Classes/DDASLLogCapture.m | |
#import "GFASLProxy.h" | |
#include <asl.h> | |
#include <notify.h> | |
#include <notify_keys.h> | |
#include <sys/time.h> | |
@implementation GFASLProxy |
/** | |
* Make a X-Domain request to url and callback. | |
* | |
* @param url {String} | |
* @param method {String} HTTP verb ('GET', 'POST', 'DELETE', etc.) | |
* @param data {String} request body | |
* @param callback {Function} to callback on completion | |
* @param errback {Function} to callback on error | |
*/ | |
function xdr(url, method, data, callback, errback) { |
// | |
// RN3DTouchGestureRecognizer.swift | |
// | |
// Created by Ryan Nystrom on 10/10/15. | |
// Copyright © 2015 Ryan Nystrom. All rights reserved. | |
// | |
import UIKit.UIGestureRecognizerSubclass | |
class RN3DTouchGestureRecognizer: UIGestureRecognizer { |
When VPNs Just Work™, they're a fantastic way of allowing access to a private network from remote locations. When they don't work it can be an experience in frustration. I've had situations where I can connect to a VPN from my Mac, but various networking situations cause routing conflicts. Here are a couple of cases and how I've been able to get around them.
In this example the VPN we are connecting to has a subnet that does not conflict with our local IP, but has additional routes that conflict in some way with our local network's routing. In my example the remote subnet is 10.0.x.0/24, my local subnet is 10.0.y.0/24, and the conflicting route is 10.0.0.0/8. Without the later route, I can't access all hosts on the VPN without manually adding the route after connecting to the VPN:
As asked by John on Twitter: https://twitter.com/johnallsopp/status/383461909640384512 | |
"wow. Animate change to left via CSS, ~500 paint/reflow events. Animate translateX - 16!" | |
Answering here because it's a long response and I'm too slack to have a | |
blog/tumble/plus/facebook/myspace. | |
NOTE: This answer is out of date. See comment below. | |
The easy answer is that changing left causes relayout, which triggers a repaint, while |
// an example of using CommonCrypto's PBKDF2 function | |
// | |
// build with: | |
// | |
// clang -o pbkdf2test pbkdf2test.c | |
// | |
// test with: | |
// | |
// ./pbkdf2test <some plaintext password here> |
// | |
// main.swift | |
// OptionParser | |
// | |
// Created by Chris Eidhof on 28.02.19. | |
// Copyright © 2019 objc.io. All rights reserved. | |
// | |
import Foundation |