Skip to content

Instantly share code, notes, and snippets.

View demianturner's full-sized avatar
💭
working on a few pet projects after work

Demian Turner demianturner

💭
working on a few pet projects after work
View GitHub Profile
//
// CircularBuffer.swift
// PollutionMonitor
//
// Created by Demian Turner on 04/06/2020.
// Copyright © 2020 Demian Turner. All rights reserved.
//
// https://gist.github.com/RinniSwift/38f55b0786d6f255c8fde00189281231
import Foundation
public struct AppInfo {
public static let current = AppInfo(bundleInfo: Bundle.main.infoDictionary!)
public let appVersion: String
public let buildNumber: String
public let appName: String
private init(bundleInfo: [String: Any]) {
@demianturner
demianturner / RandomSentenceGenerator.swift
Created August 31, 2020 11:15 — forked from jepers/RandomSentenceGenerator.swift
A simple way to generate random sentences using NSSpellChecker.
import AppKit
let filteredWords = Set<String>(["app", "apps"])
let questionPrefixes = Set<String>([
"Which", "What", "Who", "Whom", "Whose", "Where", "When", "How", "Why", "Can",
"May", "Will", "Is", "Do", "Shall", "Has", "Must", "Would", "Could", "Should"
])
extension String {
@demianturner
demianturner / blockchain-coding-test.swift
Created July 27, 2020 14:14
Blockchain interview code
import UIKit
import XCTest
struct UserResponse: Decodable {
// required
let id: String
// required
let name: String
Verifying that "demianturner.id" is my Blockstack ID. https://onename.com/demianturner

Keybase proof

I hereby claim:

  • I am demianturner on github.
  • I am demianturner (https://keybase.io/demianturner) on keybase.
  • I have a public key whose fingerprint is 3B80 9F5E 1166 6F2F AB5B 90F5 10ED 9230 0947 0C42

To claim this, I am signing this object:

@demianturner
demianturner / hack.sh
Created April 5, 2012 11:17 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#