Skip to content

Instantly share code, notes, and snippets.

View mikebob's full-sized avatar

Mike Bobiney mikebob

View GitHub Profile
@steipete
steipete / swift-testing-playbook.md
Last active January 15, 2026 11:54
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

@aronreisx
aronreisx / tutorial-rename-wsl-disto.txt
Created December 11, 2021 19:16
How to rename WSL Distro on Windows
To rename WSL Distros on Windows follow the steps:
1. Stop all instances of WSL
On PowerShell run the command: wsl --shutdown
2. Open Registry Editor and go to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss
Each subfolder on Lxss represents a distro
3. Locate and rename the distro you want
Inside each distro folder you have the DistributionName, change it and click ok
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active January 5, 2026 06:12
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@orlandoaleman
orlandoaleman / Macros.h
Last active May 20, 2018 18:33 — forked from numo16/Macros.h
Useful XCode Macros from an iOS developerhttp://orlandoaleman.com
/*
Macros.h by Orlando Aleman Ortiz <orlando@orlandoaleman.com>
*/
#define ApplicationDelegate [[UIApplication sharedApplication] delegate]
#define Bundle [NSBundle mainBundle]
#define DATE_COMPONENTS NSYearCalendarUnit|NSMonthCalendarUnit|NSDayCalendarUnit
#define DateString [NSDateFormatter localizedStringFromDate:[NSDate date] dateStyle:NSDateFormatterShortStyle timeStyle:NSDateFormatterNoStyle]
#define FlushPool(p) [p drain]; p = [[NSAutoreleasePool alloc] init]
#define HexAlphaColor(c, a) [UIColor colorWithRed:((c>>16)&0xFF)/255.0 green:((c>>8)&0xFF)/255.0 blue:(c&0xFF)/255.0 alpha:a]
@mikebob
mikebob / FramingViewController.m
Created October 24, 2011 11:38
ViewController snippet from Smarty Pix
-(void)closeFramingView
{
NSFileManager *fileManager= [NSFileManager defaultManager];
if(![fileManager fileExistsAtPath:USER_PICS_DIRECTORY])
if(![fileManager createDirectoryAtPath:USER_PICS_DIRECTORY withIntermediateDirectories:YES attributes:nil error:NULL])
NSLog(@"Error: Create folder failed %@", USER_PICS_DIRECTORY);
NSString *pngPath = [NSString stringWithFormat:@"%@%@.png",
USER_PICS_DIRECTORY, [UserPrefsHandler UserPicFileName]];
@mikebob
mikebob / SPXFrameScroller.h
Created October 24, 2011 11:27
Custom UIScrollView that supports pinch and double tap zooming
//
// SPXFrameScroller.h
// SmartyPix
//
// Created by Mike Bobiney on 8/23/11.
// Copyright 2011 Tap Through Apps LLC. All rights reserved.
//
#import <Foundation/Foundation.h>