Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
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) } | |
} |
Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
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 |
@implementation NSApplication (OpenAtLogin) | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wdeprecated-declarations" | |
- (BOOL)openAtLogin | |
{ | |
LSSharedFileListItemRef loginItem = [self loginItem]; | |
BOOL result = loginItem ? YES : NO; |
// 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 |
// | |
// 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 { |
#!/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 |