Skip to content

Instantly share code, notes, and snippets.


Bruno Scheele SpacyRicochet

View GitHub Profile
SpacyRicochet /
Created Jul 19, 2018
Creating an app – Things to keep in mind
  • How does your app access its data?
    • How do you make sure your components have access to the data they need?
    • What manages the data?
  • How does your screen show that it's loading something? (e.g. from the internet)
    • How does your screen show that the loading failed?
  • How does your screen show a modal explanation of something? (e.g. tutorial, alert dialog)
  • How does a user fill in information?
    • How do you validate that information?
    • How is the user shown that certain input is wrong/didn't pass validation?
  • How does the onboarding show?
SpacyRicochet / drtc_wishlist
Last active Apr 9, 2017
Death Road to Canada wishlist
View drtc_wishlist
* Some setting to allow always randomizing your starting leader and buddy.
* Being able to share custom characters somehow. Would be great download some that other people made.
* Some extra exploration; would love some random, non-useful gags to discover in certain locations.
View feedme_pp_en.markdown

Feed me

Feed Me is a simple application that allows you to keep track of your child's nutrition, sleep, diapers and medicine-use.

Below we outline our Privacy Policy.

Privacy Policy

Feed Me keeps all of your personal data in your own hands. We have no way of accessing your data.

SpacyRicochet / Playgrounds.swift
Created Feb 5, 2017
Snippet of the Week: Lighter and Darker Colors
View Playgrounds.swift
import UIKit
import PlaygroundSupport
public extension UIColor {
public func hsba() -> (hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat)? {
var hue: CGFloat = .nan, saturation: CGFloat = .nan, brightness: CGFloat = .nan, alpha: CGFloat = .nan
guard self.getHue(&hue, saturation: &saturation, brightness: &brightness, alpha: &alpha) else {
return nil
return (hue: hue, saturation: saturation, brightness: brightness, alpha: alpha)
SpacyRicochet / Playgrounds.swift
Created Jan 29, 2017
Snippet of the Week; Prototyping views in Playgrounds
View Playgrounds.swift
import UIKit
import PlaygroundSupport
//: NSLayoutConstraint convenience methods
public extension NSLayoutConstraint {
public static func pinning(attribute: NSLayoutAttribute, ofView firstView: UIView, toView secondView: UIView, multiplier: CGFloat = 1, offset: CGFloat = 0) -> NSLayoutConstraint {
return NSLayoutConstraint(item: firstView, attribute: attribute, relatedBy: .equal, toItem: secondView, attribute: attribute, multiplier: multiplier, constant: offset)
SpacyRicochet / Pages2PDF.script
Created Jan 20, 2017
Apple Script that _should_ export all selected .pages documents to PDF. Doesn't work due to Sandboxing.
View Pages2PDF.script
on run {input, parameters}
repeat with _document in input
tell application "Finder"
set _directory to get container of file _document
set _documentName to name of _document
if _documentName ends with ".pages" then ¬
set _documentName to text 1 thru -7 of _documentName
SpacyRicochet / gist:addeae7601de1ba54e19de440cc2db0b
Created Oct 10, 2016
Using lanes to update POEditor strings
View gist:addeae7601de1ba54e19de440cc2db0b
desc "Downloads the latest apple_strings and updates the project with them."
lane :"update_strings" do
puts "Updating English."
update_language(lang: 'en', base: true)
puts "Updating French."
update_language(lang: 'fr')
puts "Updating German."
update_language(lang: 'de')
SpacyRicochet / instructions.markdown
Created Sep 21, 2016
How to make a bootable macOS Sierra installer drive
View instructions.markdown
  1. Follow the instructions on this iMore tutorial
  2. EXCEPT when you have to enter the terminal command, use the following command instead;

sudo /Applications/Install\ macOS\ --volume /Volumes/elcap --applicationpath /Applications/Install\ macOS\ --nointeraction

View gist:eff379aba07f995e0b8ec34c3b8a01fa
If you construct a Swift NSObject subclass with a designated initialiser that only has default parameters, for example;
class SomeClass: NSObject {
private let foo: Int!
init(foo bar: Int = 1) {
foo = bar
SpacyRicochet / CwlRandom+NWA.swift
Created Aug 14, 2016
Uniformly distributed random numbers for @CocoawithLove's Xoroshiro implementation
View CwlRandom+NWA.swift
// CwlRandom+NWA.swift
// Butterfly
// Created by Bruno Scheele on 10/07/16.
// Copyright © 2016 Noodlewerk Apps V.o.f. All rights reserved.
import Foundation
You can’t perform that action at this time.