Skip to content

Instantly share code, notes, and snippets.

View ryanfrancesconi's full-sized avatar

Ryan Francesconi ryanfrancesconi

  • Audio Design Desk
  • Portland, OR, USA
View GitHub Profile
@travisnewby
travisnewby / PKCE.swift
Created July 8, 2021 13:11
Client-side implementation of PKCE in Swift
import Foundation
import CryptoKit
///
/// An easy-to-use implementation of the client side of the [PKCE standard](https://datatracker.ietf.org/doc/html/rfc7636).
///
struct PKCE {
typealias PKCECode = String
@dceddia
dceddia / symbolicate.rb
Created June 26, 2021 18:58
Symbolicate a macOS crash report from Sentry
#!/usr/bin/env ruby
# colorization without needing a gem
class String
def colorize(color_code)
"\e[#{color_code}m#{self}\e[0m"
end
def red
colorize(31)
@objc protocol AURenderCallbackDelegate {
func performRender(_ ioActionFlags: UnsafeMutablePointer<AudioUnitRenderActionFlags>,
inTimeStamp: UnsafePointer<AudioTimeStamp>,
inBusNumber: UInt32,
inNumberFrames: UInt32,
ioData: UnsafeMutablePointer<AudioBufferList>?) -> OSStatus
}
func renderCallback(_ inRefCon:UnsafeMutableRawPointer,
ioActionFlags:UnsafeMutablePointer<AudioUnitRenderActionFlags>,
@swillits
swillits / Keycodes.swift
Last active May 21, 2024 10:09
Swift Keyboard Keycodes
struct Keycode {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
static let returnKey : UInt16 = 0x24
static let enter : UInt16 = 0x4C
static let tab : UInt16 = 0x30
static let space : UInt16 = 0x31
static let delete : UInt16 = 0x33
static let escape : UInt16 = 0x35
@CanTheAlmighty
CanTheAlmighty / DisplayLink.swift
Last active March 10, 2024 08:43
DisplayLink for OSX