Skip to content

Instantly share code, notes, and snippets.

View mattia's full-sized avatar

Mattia Valzelli mattia

View GitHub Profile
@lukeredpath
lukeredpath / Converting a TCA App to Swift 6.md
Last active February 2, 2025 11:58
Converting a TCA app to Swift 6

I maintain the Community mobile app - a moderately large codebase that is fully modularized using Swift Package Manager and uses The Composable Architecture. I have recently completed the process of getting the project ready for Xcode 16 and Swift 6 and I wanted to outline the approach I took and some of the issues I encountered, especially regarding TCA.

The Approach

There are already [good

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) {
@eddy-22
eddy-22 / awesome-mac-cli-apps.md
Created February 16, 2023 22:36
MacOS Cool Stuff

A curated list of useful command line apps, in celebration of the TUI.

“Knowledge brings fear” (Mars University Mission Statement)

Awesome

If you want to contribute, you are highly encouraged to do so. Please read the contribution guidelines.

//
// 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 April 12, 2025 01:49
(Almost) Every WWDC videos download links for aria2c.
@zntfdr
zntfdr / firebase-iOS-breakdown.swift
Last active September 24, 2024 06:29
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