Skip to content

Instantly share code, notes, and snippets.

View brindy's full-sized avatar
🏝️
On Vacation

Christopher Brind brindy

🏝️
On Vacation
View GitHub Profile
{"app_name":"iosrigeditor","timestamp":"2023-10-15 22:55:30.00 +0100","app_version":"1.4.2","slice_uuid":"277e3a32-ae20-3a11-a969-1f28c920a717","adam_id":"1532734914","build_version":"1.4.2","platform":2,"bundleID":"com.kempermusic.iosrigeditor","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"iPhone OS 17.0.3 (21A360)","roots_installed":0,"name":"iosrigeditor","incident_id":"9398379C-4F01-4FAE-B54B-88BEB156F034"}
{
"uptime" : 280,
"procRole" : "Foreground",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "iPad8,11",
"coalitionID" : 617,
"osVersion" : {
@brindy
brindy / DragonLight.swift
Created January 10, 2023 13:53
An example of using HomeKit to periodically change the colour of a light to something random. (Targets iOS 15.6)
//
// ContentView.swift
// DragonLight
//
// Created by Chris Brind on 09/01/2023.
//
import SwiftUI
import HomeKit
import Combine
struct ContentView: View {
let items = [
"Hello",
"World"
]
var body: some View {
NavigationView {
@brindy
brindy / ViewController.swift
Created August 31, 2022 10:04
Update SwiftUI EditMode from UIKit
//
// ViewController.swift
// EditButtonExample
//
// Created by Chris Brind on 31/08/2022.
//
import UIKit
import SwiftUI
import Combine
@brindy
brindy / gist:c0dccfff2230ec9b437b040a5d6ed215
Created September 27, 2021 11:24
swiftlint custom rules for explicit non-final classes
custom_rules:
explicit_non_final_class:
included: ".*\\.swift"
excluded: ".*Tests\\.swift"
name: "Implicitly non-final class"
regex: "^\\s*(class) (?!func|var)"
capture_group: 0
match_kinds:
- keyword
message: "Classes should be `final` by default, use explicit `internal` or `public` for non-final classes."
Verifying my identity on Peepeth.com 0x4f6d2e4bf8886511c506702cfb8845ad9a67af8d
@brindy
brindy / heic2jpg.swift
Created March 11, 2019 11:57
macOS command line program to convert HEIC images to JPGs
import Foundation
import Cocoa
guard CommandLine.arguments.count > 1 else {
fatalError("Usage: heic2jpg <folder>")
}
let folder = CommandLine.arguments[1]
guard let files = try? FileManager().contentsOfDirectory(atPath: folder) else {
@brindy
brindy / UITabBarController+TabBarAnimations.swift
Created February 3, 2018 10:59
UITabBarController extension for hiding and showing TabBar
// Also works well on iPhone X
// Example usage:
/*
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
tabBarController?.setTabBarVisible(visible: false, animated: true)
}
*/
@brindy
brindy / gist:874f4bb150d088ef0d02
Last active August 29, 2015 14:01
Brindy's UK Games Expo Agenda
  • Friday 10am-2pm RPG966 Buried Burdens (Numenera with Graham Spearing)
  • Friday 3pm-7pm RPG568 Dragons of Despair (Savage Worlds: DragonLance with GM Draeus)
  • Saturday 3pm-7pm RPG952 Shiny! (Cthulhu Firefly RPG with Max Bantleman)
  • Sunday 10am-2pm RPG861 Quien disparo a Kennedy? (GUMSHOE Timewatch with Paul Baldowski)
  • Sunday 3pm-7pm RPG717 Made for Each Other (13th Age with Pete Griffiths)
@brindy
brindy / gist:3832265
Created October 4, 2012 08:33
Mackapar Suspended Particle Exciter Display
.!.
!!!!!.
. '!!!!!.
.!!!. '!!!!!.
.!!!!!!!. '!!!!!.
.!!!!!!!!!' .!!!!!!!.
'!!!!!!!' .!!!!!!!!!'
'!!!!!. '!!!!!!!'