Skip to content

Instantly share code, notes, and snippets.

@tjbarber
tjbarber / gist:1a754e939a205aaaf3c36103f6e6c972
Last active December 15, 2020 15:50
Simple Main/Detail Setup in SwiftUI where you can edit passed object in Detail view
//
// ContentView.swift
// ActivityTracker
//
// Created by TJ Barber on 12/10/20.
//
import SwiftUI
struct Activity: Identifiable, Codable, Hashable {
{"caused_by":"macos","macos_version":"Mac OS X 10.14.6 (18G95)","os_version":"Bridge OS 3.6 (16P6571)","macos_system_state":"running","incident_id":"5C7B9E29-8DD6-465E-911A-E17AD720B43F","timestamp":"2019-10-02 15:11:59.00 +0000","bug_type":"210"}
{
"build" : "Bridge OS 3.6 (16P6571)",
"product" : "iBridge2,3",
"kernel" : "Darwin Kernel Version 18.7.0: Tue Aug 20 15:27:14 PDT 2019; root:xnu-4903.271.2~1\/RELEASE_ARM64_T8010",
"incident" : "5C7B9E29-8DD6-465E-911A-E17AD720B43F",
"crashReporterKey" : "c0dec0dec0dec0dec0dec0dec0dec0dec0de0001",
"date" : "2019-10-02 15:11:58.98 +0000",
"panicString" : "panic(cpu 1 caller 0xfffffff027068d18): x86 CPU CATERR detected\nDebugger message: panic\nMemory ID: 0xff\nOS version: 16P6571\nmacOS version: 18G95\nKernel version: Darwin Kernel Version 18.7.0: Tue Aug 20 15:27:14 PDT 2019; root:xnu-4903.271.2~1\/RELEASE_ARM64_T8010\nKernelCache UUID: 885977DF2F52326CF4784472A3CF2590\nKernel UUID: DE3F494A-B901-34B4-9504-6454BC772145\niBoot version: iBoot-4513.270.1
@tjbarber
tjbarber / ImageCachingService.swift
Last active March 7, 2021 22:20
Simple Image Downloading/Caching Service
//
// ImageCachingService.swift
// Exuberant
//
// Created by TJ Barber on 12/20/17.
// Copyright © 2017 Thomas J. Barber. All rights reserved.
//
import UIKit
@tjbarber
tjbarber / simpleMultiplication
Last active December 18, 2015 15:49
simple multiplication table in js
for (var i = 1, buffer = "\n"; i <= 9; i++) {
for (var h = 1; h <= 9; h++) {
buffer += (i * h) + " ";
}
buffer += "\n";
}