Skip to content

Instantly share code, notes, and snippets.

View blite's full-sized avatar

ben blite

  • Brandon, MS
View GitHub Profile
@TyrfingMjolnir
TyrfingMjolnir / RawHTTP.swift
Last active September 15, 2023 01:32 — forked from kaqu/RawHTTP.swift
Swift HTTP over Network framework
import Network
let host: NWEndpoint.Host = .init( "httpbin.org" )
let port: NWEndpoint.Port = .https
let tlsConfig: NWProtocolTLS.Options = .init()
let parameters: NWParameters = .init( tls: tlsConfig )
let connection: NWConnection = .init( host: host, port: port, using: parameters )
connection.stateUpdateHandler = { state in
print( "State Update: \( state )" )
}
@michaeldorner
michaeldorner / gist:746c659476429a86a9970faaa6f95ec4
Last active January 4, 2024 10:34 — forked from rgcottrell/gist:5b876d9c5eea4c9e411c
An FM Synthesizer in Swift using AVAudioEngine
import AVFoundation
import Foundation
// The single FM synthesizer instance.
private let gFMSynthesizer: FMSynthesizer = FMSynthesizer()
public class FMSynthesizer {
@ogrrd
ogrrd / dnsmasq OS X.md
Last active May 14, 2024 08:39
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install