Skip to content

Instantly share code, notes, and snippets.

@patgarner
patgarner / ContentView.swift
Created March 9, 2025 21:53 — forked from Koshimizu-Takehito/ContentView.swift
表示中のピクセルデータからボタンの色を切り替える
import SwiftUI
struct ContentView: View {
@State private var image = UIImage()
@State private var buttonRect = CGRect()
@State private var isBrightBackground = false
@State private var viewID = UUID()
var body: some View {
NavigationStack {
@patgarner
patgarner / Spiral.swift
Created December 31, 2024 22:41 — forked from Koshimizu-Takehito/Spiral.swift
アルキメデスのらせん
import SwiftUI
struct ContentView: View {
@State var start = Date()
var body: some View {
TimelineView(.animation) { context in
let time = context.date.timeIntervalSince(start) / 120
let rotation = 0.8 + 0.2 * abs((cos(.pi * time) + 1.0) / 2.0)
Canvas { context, size in
@patgarner
patgarner / st.txt
Created February 14, 2024 22:32 — forked from bryc/st.txt
Scream Tracker Manual (1990)
Scream Tracker
<<<<< USERS MANUAL >>>>>
(C) 1990 Sami Tammilehto
==============================================================================
@patgarner
patgarner / 32.asm
Created January 11, 2023 21:08 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@patgarner
patgarner / TidalCyclesQuickReferenceStub.tidal
Created December 19, 2020 04:54 — forked from mxactvtd/TidalCyclesQuickReferenceStub.tidal
TidalCycles Quick Reference compiled and partially rewritten documentation from various sources
---- TidalCycles QUICK REFERENCE ----
----------------------------------------------------------------
-- To use in your editor after or alongside your code for quick reference
-- Work in progress, mostly to be used as basis for further documnentation work, sorry for the errors and omissions
-- designed with atom - monokai one dark vivid as theme
-- https://gist.github.com/mxactvtd/bf3fb357a419c7f063b98dfd9a66cf78 - check for update, I keep updating this quite often atm
----------------------------------------------------------------
-- Some sources of Documentation --
-- https://tidalcycles.org/patterns.html
-- https://tidalcycles.org/functions.html
import SwiftUI
import PlaygroundSupport
// NOTE: this example currently only works with US-based coordinates
// constants
// New York
let latitude = 40.709335
let longitude = -73.956558
import SwiftUI
import SafariServices
import PlaygroundSupport
// lil news api
let apiURL = "https://api.lil.software/news"
struct News: Codable {
var articles: [Article]
}
@patgarner
patgarner / ABOUT.md
Created December 16, 2019 16:42 — forked from laobubu/ABOUT.md
A very simple HTTP server in C, for Unix, using fork()

Pico HTTP Server in C

This is a very simple HTTP server for Unix, using fork(). It's very easy to use

How to use

  1. include header httpd.h
  2. write your route method, handling requests.
  3. call serve_forever("12913") to start serving on port 12913
@patgarner
patgarner / SMBDIS.ASM
Created February 17, 2018 00:16 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger ([email protected])
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no

Apple's Swift team has an opening for a DevOps engineer! If you are interested, please email: [email protected]

Job Summary

Are you excited about Swift? Imagine what you could do for software development as a member of the Swift team at Apple, where you will have an opportunity to make an impact on both the Swift open source community and on Apple's developer tools products!

As a DevOps quality engineer on the Swift team, you will help engineer solutions to enable better development processes and raise the bar on the quality of the Swift compiler, both as a component of Xcode, and as an open source project. This team architects and maintains a large continuous integration (Jenkins) and automation system, so experience with scaling an infrastructure and automation is highly desired. This role also requires stellar communication, collaboration, and organization skills. The successful candidate is also highly motivated and proactive, detail-oriented, and has a passion for seeking ever hig