Skip to content

Instantly share code, notes, and snippets.

View bennokress's full-sized avatar
👨‍💻
while !isSuccessful { tryAgain() }

Benno Kress bennokress

👨‍💻
while !isSuccessful { tryAgain() }
View GitHub Profile
@steipete
steipete / swift-testing-playbook.md
Last active July 10, 2025 15:07
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

@gabe565
gabe565 / change-arc-icon.md
Last active May 26, 2025 02:32
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy

[This portion of call begins at 25:47]

Me: I could make it really easy on you, if you think Apollo is costing you $20 million per year, cut me a check for $10 million and we can both skip off into the sunset. Six months of use. We're good. That's mostly a joke.

Reddit: Six months of use? What do you mean? I know you said that was mostly a joke, but I want to take everything you're saying seriously just to make sure I'm not - what are you referring to?

Me: Okay, if Apollo's opportunity cost currently is $20 million dollars. At the 7 billion requests and API volume. If that's your yearly opportunity cost for Apollo, cut that in half, say for 6 months. Bob's your uncle.

Reddit: You cut out right at the end. I'm not asking you to repeat yourself for a third time, but you legit cut out right at the end. "If your opportunity cost is $10 million" and then I lost you.

@nakami
nakami / paybackhelper.js
Created January 28, 2022 16:27
Adds a button to the Payback website to activate all coupons
// ==UserScript==
// @name Activate All Payback Coupons
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Activating all Coupons on Payback.de with one click
// @author nakami
// @copyright 2022 nakami
// @license GNU General Public License v2.0
// @include http*://www.payback.de/coupons*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
@Shawin
Shawin / USA-Election-2020.js
Last active November 25, 2020 14:20
USA Election 2020 Votes – Scriptable Widget
// start with this
let widget = new ListWidget()
//
// Set colors
let bidenColor = new Color("1a68ff")
let trumpColor = new Color("ff4a43")
let bidenColor2 = new Color("1a68ff", 0.8)
let trumpColor2 = new Color("ff4a43", 0.8)
@kevinkub
kevinkub / incidence.js
Last active December 4, 2024 22:48
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
class IncidenceWidget {
constructor() {
this.previousDaysToShow = 31;
this.apiUrlDistricts = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=RS,GEN,cases7_bl_per_100k,cases7_per_100k,BL&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
this.apiUrlDistrictsHistory = (districtId) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/ArcGIS/rest/services/Covid19_hubv/FeatureServer/0/query?where=IdLandkreis%20%3D%20%27${districtId}%27%20AND%20Meldedatum%20%3E%3D%20TIMESTAMP%20%27${this.getDateString(-this.previousDaysToShow)}%2000%3A00%3A00%27%20AND%20Meldedatum%20%3C%3D%20TIMESTAMP%20%27${this.getDateString(1)}%2000%3A00%3A00%27&outFields=Landkreis,Meldedatum,AnzahlFall&outSR=4326&f=json`
this.stateToAbbr = {
@Zikoat
Zikoat / README.md
Last active January 11, 2024 11:01
last ned bøker fra Brettboka.no

Brettboka Downloader

Nedlastingsverktøy for brettboka.no

Laster ned hver side som et bilde

Boken må være kjøpt

HVORDAN LASTE NED BØKER

  1. logg inn på web-versjonen av brettboka.no, og åpne boken du vil laste ned
let a: Double? = 1.0
let b: Double? = 2.0
let c: Double? = 3.0
let d: Double? = 4.0
let e: Double? = 5.0
let f: Double? = 6.0
let g: Double? = 7.0
extension Optional {
func `or`(_ value : Wrapped?) -> Optional {
@jatubio
jatubio / prepare-commit-msg
Last active December 30, 2022 07:36
prepare-commit-msg git hook to add branch name to commit message
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, rename this file to "prepare-commit-msg".
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"