Skip to content

Instantly share code, notes, and snippets.

View Obbut's full-sized avatar

Robbert Brandsma Obbut

  • Veldhoven, NL
  • 19:44 (UTC +01:00)
View GitHub Profile
@steipete
steipete / swift-testing-playbook.md
Last active December 10, 2025 10:06
The Ultimate Swift Testing Playbook (feed it your agents for better tests!)

The Ultimate Swift Testing Playbook (2024 WWDC Edition, expanded with Apple docs from June 2025)

Updated with info from https://developer.apple.com/documentation/testing fetched via Firecrawl on June 7, 2025.

See also my blog: See also my blog post: https://steipete.me/posts/2025/migrating-700-tests-to-swift-testing

A hands-on, comprehensive guide for migrating from XCTest to Swift Testing and mastering the new framework. This playbook integrates the latest patterns and best practices from WWDC 2024 and official Apple documentation to make your tests more powerful, expressive, and maintainable.


1. Migration & Tooling Baseline

@dees040
dees040 / deploy_site
Last active August 22, 2023 19:47
Deploy a Vue.JS app on Laravel Forge with zero downtime
#!/bin/bash
set -e
SITE=$1
HOME="/home/forge"
DESTINATION="$HOME/$SITE"
TARGET="$HOME/deployments/$SITE/current"
function display_usage() {
@Joannis
Joannis / VaporLeopardBridge.swift
Created August 11, 2017 14:16
Requires Leopard beta 1 and Vapor 2
import Vapor
import Leopard
import Lynx
import Sockets
import HTTP
public final class LynxServer : ServerProtocol, AsyncRouter {
public func register(at path: [String], method: Lynx.Method?, isFallbackHandler: Bool, handler: @escaping RequestHandler) {
router.register(at: path, method: method, isFallbackHandler: isFallbackHandler, handler: handler)
}
@lattner
lattner / TaskConcurrencyManifesto.md
Last active December 10, 2025 18:44
Swift Concurrency Manifesto
@steipete
steipete / ios-xcode-device-support.sh
Last active May 11, 2025 13:30
Using iOS 15 devices with Xcode 12.5 (instead of Xcode 13)
# The trick is to link the DeviceSupport folder from the beta to the stable version.
# sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
# Support iOS 15 devices (Xcode 13.0) with Xcode 12.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
# Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
# (A similar approach works for older versions too, just change the version number after DeviceSupport)
@bmhatfield
bmhatfield / .profile
Last active August 9, 2025 20:28
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else