Skip to content

Instantly share code, notes, and snippets.

@hansfaffing
hansfaffing / MoonPhaseIntentAppDelegate.swift
Last active October 26, 2025 17:50
Drop this into a iOS template app's AppDelegate to create an app that provides the Moon Phase via App Intents. Generally a good simple example of how iOS Swift App Intents work.
// Created by HansFaffing on 9/1/25.
// 1. Drop this into a iOS template app's AppDelegate to create an app that provides the Moon Phase via App Intents.
// - New Project -> iOS -> App (Interface: Storyboard, Language: Swift)
// 2. Update the "identifier" below to be correct
// 3. Load onto the iPhone of your choice
// 4. In iOS Shortcuts create a shortcut that uses the current returning Phase from it:
// - Returned value "Current Moon Phase" can be either: "New", "Full", "Waxing", "Waning", or "Error"
// 5. Use however you please, say thanks to hans maybe, refine this quick sketch of work
import UIKit
@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active December 5, 2025 09:36
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

/*
* posix_memalign wrapper with random failurres
*
* Copyright (c) 2013, Derek Buitenhuis
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES