Skip to content

Instantly share code, notes, and snippets.

View domhofmann's full-sized avatar

dom hofmann domhofmann

View GitHub Profile
{
attribution: 'Hello, world!',
headline: 'This is my first Signal!'
}
{
attribution: 'Hello, world!',
headline: 'This is my first Signal'
}
import UIKit
protocol Tweenable {
static func tweenedValue(begin: Self, end: Self, progress: Float) -> Self
}
extension Float: Tweenable {
typealias ValueType = Float
static func tweenedValue(begin: Float, end: Float, progress: Float) -> Float {

Keybase proof

I hereby claim:

  • I am domhofmann on github.
  • I am dhof (https://keybase.io/dhof) on keybase.
  • I have a public key ASCBcBObiDdWBXORbAEZE9Vx2NMdkJdxBxNi6VNq8jAuUwo

To claim this, I am signing this object:

@domhofmann
domhofmann / onono.md
Last active August 23, 2020 11:59
onono

Onavo Protect is a free and popular VPN owned by Facebook.

Facebook ostensibly uses Onavo to monitor user network traffic, specifically to gain insight into what is and isn't working in competing apps. That kind of sucks if you're building a consumer app and aren't planning on selling it to Facebook.

Detecting if the people who use your app are also using Onavo and encouraging them to disable it might be helpful to you.

Here is some Swift code that does that:

func checkForBadIP (_ ip: String) -> Bool {
@domhofmann
domhofmann / CGRect+Convenience.swift
Created November 28, 2018 18:07
CGRect Convenience
//
// CGRect+Convenience.swift
//
// Created by Dom Hofmann on 9/5/18.
// Copyright © 2018 Dom Hofmann. All rights reserved.
//
import Foundation
import UIKit