Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
SRC1=$HOME/Library/Safari
SRC2=$HOME/Library/Containers/com.apple.Safari/Data/Library/Safari
HOST=$( hostname | sed 's/\..*//' )
HOUR=$( date +"%H" )
DST=$HOME/Sync/Safari/$HOST/$HOUR
mkdir -p $DST 2>/dev/null
cd $SRC1
@haikusw
haikusw / MeshEntity+GenerateSolidInteriorModel.swift
Created January 25, 2024 05:45 — forked from drewolbrich/MeshEntity+GenerateSolidInteriorModel.swift
A RealityKit ModelEntity extension that replaces its model with a new model with reversed triangle indices
//
// MeshEntity+GenerateSolidInteriorModel.swift
//
// Created by Drew Olbrich on 12/16/23.
//
import RealityKit
extension ModelEntity {
//
// ContentView.swift
// RigelianTagger
//
// Created by Berrie Kremers on 05/03/2022.
//
// This shows how a directory structure can be shown in a sidebar, with dynamic loading
// of additional content as the user drills down in the hierarchy.
//
@haikusw
haikusw / Info.plist
Created November 8, 2023 20:55 — forked from georgebrock/Info.plist
AppleScript to handle URLs
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- ... -->
<!-- Add this section: -->
<key>CFBundleURLTypes</key>
<array>
<dict>
@haikusw
haikusw / xcbuild-debugging-tricks.md
Created September 17, 2023 23:54 — forked from ddunbar/xcbuild-debugging-tricks.md
Xcode new build system debugging tricks

New Build System Tricks

Command Line

alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
# THIS DOESNT WORK YET: xcbuild openIDEConsole  # … then switch to Xcode ➡️
xcbuild showSpecs
xcbuild build <foo.pif> [—target <target>]
@haikusw
haikusw / Devices.md
Created September 15, 2023 18:52 — forked from schwa/Devices.md
Metal 3 Availablity & GPU Family Table

Metal 3 Availablity & GPU Family Table

Device OS SOC Metal GPU Family
iPhone 6S & 6S Plus iOS 15 A8 2 Apple2
iPhone SE (1st generation) iOS 15 A9 2 Apple3
iPhone 7 & 7 Plus iOS 15 A10 Fusion 2 Apple3
iPod Touch (7th generation) iOS 15 A10 Fusion 2 Apple3
iPhone 8 & 8 Plus iOS 15, 16 A11 Bionic 2 Apple4
iPhone X iOS 15, 16 A11 Bionic 2 Apple4
@haikusw
haikusw / Best in Class iOS Checklist
Created July 13, 2023 20:10 — forked from DreamingInBinary/Best in Class iOS Checklist
This is a public checklist updated every year after the latest version of iOS and iPadOS are shipped. It's a boiled down version of a "Best in Class" app checklist created by Jordan Morgan.
# A Best in Class Checklist
A boiled down checklist adapted from this [post](https://www.swiftjectivec.com/a-best-in-class-app/), created by @jordanmorgan10.
> To use this, create a Github Issue in your own repo, and simply copy and paste this text.
## iOS Core Technology
_Things any iOS app can benefit from_
- [ ] iCloud Sync
- [ ] Focus Filter Support
@haikusw
haikusw / bookcase.scad
Created July 1, 2023 23:47 — forked from joeycastillo/bookcase.scad
VERY WORK-IN-PROGRESS case for Open Book Abridged Edition
// Render front side
front = true;
// Render back side
back = true;
// level of detail
level_of_detail = 60;
// The thickness of the PCB as fabricated
@haikusw
haikusw / IP.swift
Created June 3, 2023 05:32 — forked from CodaFi/IP.swift
An async sequence of kevents
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import Glibc
#else
#error("unsupported platform")
#endif
/// Core utilities for interacting with IP-based abstractions.
public struct IP {
@haikusw
haikusw / Bundle+TestFlight.swift
Created June 2, 2023 19:56 — forked from lukaskubanek/Bundle+TestFlight.swift
A code snippet for detecting the TestFlight environment for a macOS app at runtime
import Foundation
import Security
extension Bundle {
/// Returns whether the bundle was signed for TestFlight beta distribution by checking
/// the existence of a specific extension (marker OID) on the code signing certificate.
///
/// This routine is inspired by the source code from ProcInfo, the underlying library
/// of the WhatsYourSign code signature checking tool developed by Objective-See. Initially,