Skip to content

Instantly share code, notes, and snippets.

View rjstelling's full-sized avatar
🕶️
Encrypting Bits

Richard Stelling rjstelling

🕶️
Encrypting Bits
View GitHub Profile
@rjstelling
rjstelling / TwoLabelButton.swift
Created May 31, 2017 13:58
A simple Auto Layout solution for a UIButton with 2 labels.
class CustomButton: UIButton {
internal required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
}
internal override init(frame: CGRect) {
super.init(frame: frame)
}
}
@rjstelling
rjstelling / Suggestions
Created December 9, 2016 16:24
When Host.swift was started, it was before we new too much about Swift 3.0, now it has arrived we have a problem... NSHost has been renamed Host when imported into Swift 3.x. We don't want to be a bad Swift citizen and iOS still doesn't have (NS)Host. so we need to rename the project. At this point I am open to any suggestions... the simpler the…
When Host.swift was started, it was before we new too much about Swift 3.0, now it has arrived we have a problem...
NSHost has been renamed Host when imported into Swift 3.x. We don't want to be a bad Swift citizen and iOS still doesn't have (NS)Host. so we need to rename the project.
At this point I am open to any suggestions... the simpler the better IMHO.
Add your suggestions here:
@rjstelling
rjstelling / SwiftCastingBug.swift
Created June 15, 2016 15:09
A Playground that demos a bug where a cast using `as` causes a, "fatal error: can't unsafeBitCast between types of different sizes".
//: Playground - Demos a bug where a cast using `as` causes a, "fatal error: can't unsafeBitCast between types of different sizes"
import UIKit
protocol Thingable {
func getStuff()
}
enum MyList: Thingable {
case One
1. No coverage of Stock price... ever.
2. No coverage of carrier contracts or offers... Unless John Legere joins the Apple board I don't want to read his name.
3. Never publish patents as news.
4. I dont care about US only Apple Pay roll outs.
5. Do not commission renderings of UI designs of unreleased products.
6. No wish lists.
@rjstelling
rjstelling / SwiftCommandLineWithNSOperation.swift
Created November 27, 2015 12:58
Swift command line script using NSOperation.
#!/usr/bin/env xcrun swift
//
// SwiftCommandLineWithNSOperation.swift
// SwiftCommandLineWithNSOperation
//
// Created by Richard Stelling on 27/11/2015.
// Copyright © 2015 Richard Stelling. All rights reserved.
//
//
// CommonMacros.h
// Created by Tom Adriaenssen (@inferis)
// Inspired by the awesome work by Piet Jaspers (@pjaspers)
//
/*
* How to use this file:
* 1. Find your .pch file
* 2. Import this file
@rjstelling
rjstelling / xmas-cracker-jokes.markdown
Last active August 29, 2015 14:11
Christmas Cracker Jokes — This work is licensed under a Creative Commons Attribution 4.0 International License. http://creativecommons.org/licenses/by/4.0/

How many Gamers does is take to change a light bulb?

Actually, its about ethics in games journalism


// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// Prerequisite:
// First, create at least a 1024x1024 px PNG file according to:
// http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BuildTimeConfiguration/BuildTimeConfiguration.html
//
// Install - Save Create Icons.jsx to:
// Win: C:\Program Files\Adobe\Adobe Utilities\ExtendScript Toolkit CS5\SDK
// Mac: /Applications/Utilities/Adobe Utilities/ExtendScript Toolkit CS5/SDK
// * Restart Photoshop

Keybase proof

I hereby claim:

  • I am rjstelling on github.
  • I am rjstelling (https://keybase.io/rjstelling) on keybase.
  • I have a public key whose fingerprint is C753 58A5 B202 D1C8 1613 84A9 F1D3 5EA3 1C57 A79D

To claim this, I am signing this object:

//
// TRVViewController.m
// AttString
//
// Created by Richard Stelling on 02/05/2013.
// Copyright (c) 2013 Richard Stelling. All rights reserved.
//
#import "TRVViewController.h"