Skip to content

Instantly share code, notes, and snippets.

import Foundation
public func printStackDepth(
label: String? = nil,
fileID: StaticString = #fileID,
line: UInt = #line
) {
let thread = pthread_self()
let stackAddress = UInt(bitPattern: pthread_get_stackaddr_np(thread))
var used: UInt = 0
withUnsafeMutablePointer(to: &used) {
//
// PagingView.swift
// Wallaroo - https://wallaroo.app
//
// Created by Sean Heber (@BigZaphod) on 8/9/22.
//
import SwiftUI
// This exists because SwiftUI's paging setup is kind of broken and/or wrong out of the box right now.
import Foundation
typealias Continuation<Ret> = (Ret) -> Void
typealias ContinuationMonad<Value> = (@escaping Continuation<Value>) -> Void
typealias Transform<T,U> = (T) -> ContinuationMonad<U>
func async<Value>(_ wrappedValue: Value) -> ContinuationMonad<Value> {
{ $0(wrappedValue) }
}

This page is now depreacted!

Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.

The Wisdom of Quinn

Informative DevForum posts from everyone's favorite DTS member.

(Arranged newest to oldest)

#!/bin/sh
# make sure you have imagemagick installed: brew install imagemagick
# your app_icons.sh file should have the correct permissions: run `chmod 775 app_icons.sh` in your terminal from where you put this file
# put your `my_icon.png` next to this file and run ./app_icons.sh to export your app icons
x=my_icon.png
y=${x%.*}
# delete the export directory so we start clean
@matthewtonkin
matthewtonkin / NSApplication+OpeanAtLogin.m
Created September 21, 2020 00:06
NSApplication Open at Login extension
@implementation NSApplication (OpenAtLogin)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (BOOL)openAtLogin
{
LSSharedFileListItemRef loginItem = [self loginItem];
BOOL result = loginItem ? YES : NO;
@IsaacXen
IsaacXen / README.md
Last active May 2, 2024 09:57
(Almost) Every WWDC videos download links for aria2c.
@zntfdr
zntfdr / firebase-iOS-breakdown.swift
Last active March 27, 2024 15:06
Firebase iOS Version breakdown
// How to:
// 1. Open the Firebase Analytics Dashboard
// 2. Scroll to bottom, where you see the "Users by Device model" widget
// 3. Click "View device models" in that widget (this opens the "Tech details" Firebase Analytics page)
// 4. Above the table shown in the new page, click on the “Device model” drop down menu and select “OS with Version”
// 5. Make sure to select “OS with version” and not “OS Version”
// 6. On the top right corner of the page, click on the “Share this report” icon (next to the date)
// 7. Click “Download file” on the new side bar, then “Download CSV"
// 8. Open the file and select the iOS/Android breakdown raw data
// 9. Replace the sample data in this script with your data
@AvdLee
AvdLee / DarwinNotificationCenter.swift
Last active January 23, 2024 07:55
A notification center for Darwin Notifications. MIT License applies.
//
// DarwinNotificationCenter.swift
//
// Copyright © 2017 WeTransfer. All rights reserved.
//
import Foundation
/// A Darwin notification payload. It does not contain any userInfo, a Darwin notification is purely event handling.
public struct DarwinNotification {
@radianttap
radianttap / wwdc19.sh
Created June 6, 2019 11:23
Fetch all WWDC 2019 session videos and PDFs
#!/bin/bash
#Setup the environment
mkdir tmp_download
cd tmp_download
#Extract IDs
echo "Downloading the index"
wget -q https://developer.apple.com/videos/wwdc2019/ -O index.html
# find parts of the document where data-released=true, all the way to the first H4 header where title of that talk is