Skip to content

Instantly share code, notes, and snippets.

Robert Davey RobJDavey

Block or report user

Report or block RobJDavey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@RobJDavey
RobJDavey / all-codes
Last active Aug 3, 2016
All possible combinations of two-letter regional identifiers
View all-codes
AA: 🇦🇦
AB: 🇦🇧
AC: 🇦🇨 Ascension Island
AD: 🇦🇩 Andorra
AE: 🇦🇪 United Arab Emirates
AF: 🇦🇫 Afghanistan
AG: 🇦🇬 Antigua & Barbuda
AH: 🇦🇭
AI: 🇦🇮 Anguilla
AJ: 🇦🇯
@RobJDavey
RobJDavey / common-crypto.h
Last active May 18, 2016
Using CommonCrypto in a Swift Script
View common-crypto.h
#include <CommonCrypto/CommonCrypto.h>
#include <CommonCrypto/CommonRandom.h>
@RobJDavey
RobJDavey / U1F300.txt
Last active Jan 16, 2018
OS X Emoji (with names from 10.11.4)
View U1F300.txt
Miscellaneous Symbols and Pictographs
🌀️ = [1F300] CYCLONE
🌁️ = [1F301] FOGGY
🌂️ = [1F302] CLOSED UMBRELLA
🌃️ = [1F303] NIGHT WITH STARS
🌄️ = [1F304] SUNRISE OVER MOUNTAINS
🌅️ = [1F305] SUNRISE
🌆️ = [1F306] CITYSCAPE AT DUSK
🌇️ = [1F307] SUNSET OVER BUILDINGS
@RobJDavey
RobJDavey / CodingKeyType.swift
Last active Aug 29, 2015
Using Swift Protocol Extensions for strongly typed coding
View CodingKeyType.swift
protocol CodingKeyType {
typealias CodingKey: RawRepresentable
}
extension CodingKeyType where Self: NSCoding, CodingKey.RawValue == String {
static func decodeObject<T: AnyObject>(inout objv: T?, fromCoder aDecoder: NSCoder, forKey key: CodingKey) {
guard let object = aDecoder.decodeObjectOfClass(T.self, forKey: key.rawValue) as? T? else {
fatalError("Failed to decode a value of type \(T.self)")
}
View keybase.md

Keybase proof

I hereby claim:

  • I am robjdavey on github.
  • I am robjdavey (https://keybase.io/robjdavey) on keybase.
  • I have a public key whose fingerprint is FF91 C71F 084F ABCC 1895 CA78 6547 8691 5861 0EC9

To claim this, I am signing this object:

@RobJDavey
RobJDavey / Skin-Tone-Emoji.txt
Created Apr 11, 2015
All the emoji that currently supports the skin tone modifier (OS X 10.10.3 / iOS 8.3)
View Skin-Tone-Emoji.txt
🎅🎅🏻🎅🏼🎅🏽🎅🏾🎅🏿
🏃🏃🏻🏃🏼🏃🏽🏃🏾🏃🏿
🏄🏄🏻🏄🏼🏄🏽🏄🏾🏄🏿
🏇🏇🏻🏇🏼🏇🏽🏇🏾🏇🏿
🏊🏊🏻🏊🏼🏊🏽🏊🏾🏊🏿
👂👂🏻👂🏼👂🏽👂🏾👂🏿
👃👃🏻👃🏼👃🏽👃🏾👃🏿
👆👆🏻👆🏼👆🏽👆🏾👆🏿
👇👇🏻👇🏼👇🏽👇🏾👇🏿
👈👈🏻👈🏼👈🏽👈🏾👈🏿
@RobJDavey
RobJDavey / Emoji-Range.txt
Last active Aug 29, 2015
Current Unicode emoji range with skin tone modifier where applicable (OS X 10.10.3 / iOS 8.3)
View Emoji-Range.txt
1F300: 🌀
1F301: 🌁
1F302: 🌂
1F303: 🌃
1F304: 🌄
1F305: 🌅
1F306: 🌆
1F307: 🌇
1F308: 🌈
1F309: 🌉
@RobJDavey
RobJDavey / Regional-Identifiers.txt
Last active Apr 19, 2017
ISO Country Codes with Regional Identifiers
View Regional-Identifiers.txt
AC: 🇦🇨 Ascension Island
AD: 🇦🇩 Andorra
AE: 🇦🇪 United Arab Emirates
AF: 🇦🇫 Afghanistan
AG: 🇦🇬 Antigua & Barbuda
AI: 🇦🇮 Anguilla
AL: 🇦🇱 Albania
AM: 🇦🇲 Armenia
AO: 🇦🇴 Angola
AQ: 🇦🇶 Antarctica
@RobJDavey
RobJDavey / Dictionary.swift
Last active Aug 29, 2015
Add two swift dictionaries together into a new optional dictionary, result is nil if there were conflicting keys
View Dictionary.swift
func +<Key, Value>(lhs: [Key: Value], rhs: [Key: Value]) -> [Key: Value]? {
var result = lhs
for (key, value) in rhs {
if contains(lhs.keys, key) {
return nil
}
result[key] = value
}
return result
}
You can’t perform that action at this time.