Skip to content

Instantly share code, notes, and snippets.

View ferranpujolcamins's full-sized avatar

Ferran Pujol Camins ferranpujolcamins

View GitHub Profile
@ferranpujolcamins
ferranpujolcamins / midiman_firmware_debian_install.md
Created February 10, 2023 18:24 — forked from rockstarartist/midiman_firmware_debian_install.md
MidiSport Midiman 2x2 USB driver installation for Raspbian Linux

Install the midisport-firmware package (firmware is in the package and the package should be available via the debian package repository)

sudo apt-get install midisport-firmware
sudo touch /etc/udev/rules.d/99-midisport-firmware.rules
sudo vi /etc/udev/rules.d/99-midisport-firmware.rules

In the editor, paste the following rules:

@ferranpujolcamins
ferranpujolcamins / existential.rs
Created November 23, 2021 12:07
A Rust implementation of data Ext b = forall a. Ext a (a -> b)
struct ExistsPrivate<A, F, B>
where F: Fn(&A) -> B {
a: A,
f: F
}
trait AnyExistsPrivate<B> {
fn extract(&self) -> B;
}
import Foundation
import RxSwift
import RxCocoa
public protocol NiceSignalEventProtocol {
associatedtype Element
func asNiceSignalEvent() -> NiceSignalEvent<Element>
}
# git alias to reset --hard the current branch to it's remote tracking branch
git config --add alias.sync '!git reset --hard "$(git rev-parse --abbrev-ref --symbolic-full-name @{u})"'