Skip to content

Instantly share code, notes, and snippets.

View andremartingo's full-sized avatar

André Martingo andremartingo

View GitHub Profile
@andremartingo
andremartingo / sample.m3u
Last active March 22, 2020 21:00
Sample
#EXTM3U
#EXTINF:-1 tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Big_buck_bunny_poster_big.jpg/1200px-Big_buck_bunny_poster_big.jpg" group-title="Sample Playlist",Big Buck Bunny
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4
#EXTINF:-1 group-title="Sample Playlist" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/8/8f/Sintel_poster.jpg/440px-Sintel_poster.jpg",Sintel
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/Sintel.mp4
/// `ObjectBinding` used as a way to create a `Binding` from a `BindableObject`. In this case the ViewModel
/// complies with `BindableObject` which is then translated into a `Binding` which is what `Toggle` is expecting
/// NOTE: Since it's a `DynamicViewProperty`, after its value is changed, the body will be updated.
class ViewModel: BindableObject {
let didChange = PassthroughSubject<ViewModel, Never>()
var isEnabled = false {
didSet {
didChange.send(self)
precedencegroup ForwardApplication {
associativity: left
higherThan: AssignmentPrecedence
}
infix operator |> : ForwardApplication
// MARK: - Forward function application
/// Forward function application.