Skip to content

Instantly share code, notes, and snippets.

FROM debian:latest
RUN dpkg --add-architecture i386
RUN apt update
RUN apt install --no-install-recommends -y wine wine32 patch
COPY os9_68k_sdk_v12 /os9-sdk-v12
COPY os9-m68k-ports /os9-m68k-ports
RUN mkdir -p /root/.wine/dosdevices/m:
// license:BSD-3-Clause
/****************************************************************************
Skeleton driver for Korg Triton
CPU: SH-2 (SH7043, HD6477043 or HD6437043)
RAM: 2x 16M(x16) DRAM
FLASH: 2x MX29F1610
FDC: HD63266
@biappi
biappi / nbd-test.swift
Created January 5, 2019 04:09
A very simplistic in-memory Swift implementation of the NBD - Network Block Device - protocol
import Foundation
import CocoaAsyncSocket
enum DataError : Error {
case endOfStream
}
extension IteratorProtocol where Element == UInt8 {
mutating func byte() throws -> UInt8 {
import Foundation
/// Wrapper class to let a Decoding operation to continue even if
/// the data is archived with a different type
///
/// This was needed because in Firestore i got an empty array
/// instead of an empty dictionary.
struct NilIfFail<A: Codable> : Codable {
let content : A?
import UIKit
protocol NibInstantiable {
static var nibName : String { get }
}
extension NibInstantiable where Self : UIView {
import UIKit
import PlaygroundSupport
func CreateAnimation(
keyPath: String,
fps: Int,
duration: TimeInterval,
keyFrames: [(frame: Int, value: Any)]
) -> CAKeyframeAnimation
{
@biappi
biappi / MidiStreamParser.swift
Last active December 16, 2017 15:53
A streaming parser of midi data
enum MidiMessage {
case noteOff (channel: Int, note: Int, velocity: Int)
case noteOn (channel: Int, note: Int, velocity: Int)
case polyphonicPressure (channel: Int, note: Int, pressure: Int)
case controlChange (channel: Int, controller: Int, value: Int)
case programChange (channel: Int, program: Int )
case channelPressure (channel: Int, pressure: Int )
case pitchBend (channel: Int, bend: Int )
case systemRealtime (event: MidiSystemRealtime)
case sysex (data: [UInt8])
@biappi
biappi / build.sh
Last active January 25, 2017 16:18
#!/bin/bash
. Scripts/functions.sh
# Non-configurable options
PLIST_BUDDY=/usr/libexec/PlistBuddy
PROFILES_DIRECTORY="${HOME}/Library/MobileDevice/Provisioning Profiles"
KEYCHAIN_PASSWORD="PASSWORD"
ARCHITECTURES="armv7 arm64"
KEYCHAIN="${HOME}/Library/Keychains/login.keychain"
//
// AMTextFieldEditorController.h
// Text Field Editor Controller
//
// Created by Antonio Malara on 6/17/13.
// Copyright (c) 2013 Antonio Malara. All rights reserved.
//
#import <UIKit/UIKit.h>
profile_id_from_file() {
test -e "$1" || die "Provisioning profile file '$1' not found"
local TMP_FILE=`mktemp -t buildscript`
security cms -D -i $1 > $TMP_FILE
/usr/libexec/PlistBuddy -c 'Print :UUID' $TMP_FILE
rm $TMP_FILE
}