Many aircraft that offer wifi only permit access to machines on port 80/443, the standard http(s) ports. If you want to SSH, you have to set up an intermediate machine that hosts the SSH service on either port 80 or 443. An easy (and free) way to do this is via a Google free-tier micro instance. These instances have a 1 GB transfer ceiling per month, but so long are you are only transmitting textual data a few days per month, this limit should not be easily exceeded. Set up one of these VMs via the Google Cloud console, and select CentOS 7 as the disk image. Make sure that you allow http/https traffic on the instance, the two checkboxes in the Firewalls section of the VM settings. Optionally, set a static external IP address for your server in the VM config, in case you don't want to look up the IP each time. Then, ssh into the new VM (the IP address will be listed as the "external IP" in the list of instances) and edi
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 LayerView<Layer: CALayer>: UIView { | |
override static var layerClass: AnyClass { | |
return Layer.self | |
} | |
var castedLayer: Layer { | |
return super.layer as! Layer | |
} | |
} |
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
// | |
// CAMediaTimingFunctions+Extended.swift | |
// Geiger | |
// | |
// Created by Ryan McLeod on 1/22/19. | |
// Copyright © 2019 Grow Pixel. 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
// | |
// TimingFunction.swift | |
// | |
// Created by tcldr on 04/11/2018. | |
// https://github.com/tcldr | |
// Copyright © 2018 tcldr. | |
// | |
// Permission is hereby granted, free of charge, | |
// to any person obtaining a copy of this software and | |
// associated documentation files (the "Software"), to |
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
// | |
// CALayer+AnimationPlayback.swift | |
// Created by Philip Vasilchenko on 4/27/18. | |
// | |
import UIKit | |
// Pause animations of layer tree | |
// | |
// Technical Q&A QA1673: |
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
// This file is in the public domain. Where | |
// a public domain declaration is not recognized, you are granted | |
// a license to freely use, modify, and redistribute this file in | |
// any way you choose. | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// Unity remake of a fake volumetric light glow effect |
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 DispatchQueue { | |
class func mainSyncSafe(execute work: () -> Void) { | |
if Thread.isMainThread { | |
work() | |
} else { | |
DispatchQueue.main.sync(execute: work) | |
} | |
} | |
class func mainSyncSafe<T>(execute work: () throws -> T) rethrows -> T { |
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
import QuartzCore | |
enum BezierType { | |
case Default | |
case Linear | |
case EaseIn | |
case EaseOut | |
case EaseInOut |
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
// The MIT License (MIT) | |
// | |
// Copyright (c) 2016 Jansel Valentin | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
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
import QuartzCore | |
extension CGFloat { | |
func map(from from: ClosedInterval<CGFloat>, to: ClosedInterval<CGFloat>) -> CGFloat { | |
let result = ((self - from.start) / (from.end - from.start)) * (to.end - to.start) + to.start | |
return result | |
} | |
} | |
extension Double { |