This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// DummyView.swift | |
// CustomShape | |
// | |
// Created by Jefferson Setiawan on 19/09/18. | |
// Copyright © 2018 Jefferson Setiawan. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
let view = UIView(frame: CGRect(x: 0, y: 0, width: 375, height: 647)) | |
view.backgroundColor = UIColor.white | |
let shadowView = UIView(frame: CGRect(x:50, y: 50, width:250, height:250)) | |
view.addSubview(shadowView) | |
let someView = UIView(frame: CGRect(x:50, y: 50, width:250, height:250)) | |
someView.backgroundColor = UIColor.white |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MySlackVC.swift | |
// TextureWorkshop | |
// | |
// Created by Jefferson Setiawan on 22/05/21. | |
// | |
import AsyncDisplayKit | |
class MySlackVC: ASDKViewController<ASTableNode> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ASCollectionDeinitCellVC.swift | |
// TextureVOUI | |
// | |
// Created by Jefferson Setiawan on 30/09/21. | |
// | |
import AsyncDisplayKit | |
internal final class ASCollectionDeinitCellVC: ASDKViewController<ASDisplayNode> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AnonymousObservable class | |
override func run<Observer: ObserverType>(_ observer: Observer, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where Observer.Element == Element { | |
let sink = AnonymousObservableSink(observer: observer, cancel: cancel) | |
let subscription = sink.run(self) | |
return (sink: sink, subscription: subscription) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Producer subscribe method (simplified) | |
let disposer = SinkDisposer() | |
let sinkAndSubscription = self.run(observer, cancel: disposer) | |
disposer.setSinkAndSubscription(sink: sinkAndSubscription.sink, subscription: sinkAndSubscription.subscription) | |
return disposer |