Skip to content

Instantly share code, notes, and snippets.

/// Returns a modified reference type
public func with<T: AnyObject>(_ this: T, update: (T) throws -> Void) rethrows -> T {
try update(this)
return this
}
/// Returns a modified copy of a value type
public func with<T>(_ item: T, update: (inout T) throws -> Void) rethrows -> T {
var this = item
try update(&this)
@m1entus
m1entus / build-ffmpeg.sh
Last active June 22, 2024 04:06
Installing ffmpeg ios libraries armv7, armv7s, i386
#!/bin/bash
###########################################################################
# Choose your ffmpeg version and your currently-installed iOS SDK version:
#
VERSION="2.0.2"
SDKVERSION="7.0"
ARCHS="armv7 armv7s i386"
#
#