Skip to content

Instantly share code, notes, and snippets.

View zackdotcomputer's full-sized avatar
🔨
Building

Zack Sheppard zackdotcomputer

🔨
Building
View GitHub Profile
@zackdotcomputer
zackdotcomputer / buildnumber.rb
Created April 27, 2020 21:56
Fastlane Ruby Build Number Function
# Generates a build number that will consistently increase worldwide.
# Useful for coordinating build uploads between teams in different timezones.
# Format is "YYYYMMDDsss" where "sss" is the 1000ths slice of the day.
# For example, I just ran it in NYC at 5:55pm on 2020-04-27 and got back: 20200427913
# If anyone else worldwide (with a correct system clock) runs it after this,
# they will get a bigger number guaranteed.
def generate_build_number()
time = Time.new.getutc
date = time.strftime("%Y%m%d")
@zackdotcomputer
zackdotcomputer / Character+isEmoji.swift
Last active July 24, 2019 03:52
Swift Character-is-emoji checker
import Foundation
extension Character {
/// An approximation of a spec-compatible "is this an emoji" check for the character.
/// Will recognize standard, flag, composite, tag emoji, and keycap emoji.
/// Unfortunately, will return true for "text presented" and malformed emoji too,
/// because I didn't do the whole CFG from Unicode.
var isEmoji: Bool {
// Empty character returns false
guard let first = self.unicodeScalars.first else {
@zackdotcomputer
zackdotcomputer / keybase.md
Created May 24, 2017 20:01
Keybase Verification

Keybase proof

I hereby claim:

  • I am zackzachariah on github.
  • I am zackzachariah (https://keybase.io/zackzachariah) on keybase.
  • I have a public key whose fingerprint is 876C 2E52 8A74 0E5F 3D4B 81AA 4133 FB29 EF30 72A0

To claim this, I am signing this object: