This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
| // | |
| // ColorButtonView.swift | |
| // MenuPopover | |
| // | |
| // Created by Cao Phuoc Thanh on 31/12/2020. | |
| // Copyright © 2020 Cao Phuoc Thanh. All rights reserved. | |
| // | |
| import UIKit |
| import UIKit | |
| import AVFoundation | |
| import Photos | |
| import MobileCoreServices | |
| class ViewController: UIViewController { | |
| override func viewDidAppear(_ animated: Bool) { | |
| super.viewDidAppear(animated) | |
| startVideoToGIFProcess() |
| import Cocoa | |
| extension DateFormatter.Style { | |
| static public var allCases: [DateFormatter.Style] = [ | |
| .none, | |
| .short, | |
| .medium, | |
| .long, | |
| .full, | |
| ] |
| import Combine | |
| import UIKit | |
| public protocol CombineCompatible {} | |
| // MARK: - UIControl | |
| public extension UIControl { | |
| final class Subscription<SubscriberType: Subscriber, Control: UIControl>: Combine.Subscription where SubscriberType.Input == Control { | |
| private var subscriber: SubscriberType? | |
| private let input: Control |
| extension Publisher where Failure == Never { | |
| func weakAssign<T: AnyObject>( | |
| to keyPath: ReferenceWritableKeyPath<T, Output>, | |
| on object: T | |
| ) -> AnyCancellable { | |
| sink { [weak object] value in | |
| object?[keyPath: keyPath] = value | |
| } | |
| } | |
| } |
| // Run from the dev tools console of any Youtube video | |
| // Accurate as of July 2, 2020. | |
| // | |
| // Copy and paste this into the dev console in a browser with the desired video loaded. | |
| // | |
| // NOTE: Some Youtube videos do not directly expose the video url in the response. | |
| // This script doesn't currently attempt to handle those. It will work for most other general video types though. | |
| (async () => { | |
| const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text); |
| // MARK: CustomLayoutInvalidationContext | |
| class CustomLayoutInvalidationContext: UICollectionViewLayoutInvalidationContext { | |
| var invalidatedBecauseOfBoundsChange: Bool = false | |
| } | |
| // MARK: CustomCollectionViewLayout | |
| class CustomCollectionViewLayout: UICollectionViewLayout { | |
| private enum ContentUpdateValue{ | |
| case fixed(value: CGFloat) |
##Installing Node.js on Amazon Linux AMI
The following will guide you through the process of installing Node.js on an AWS EC2 instance running Amazon Linux AMI 2016.09 - Release Notes
For this process I'll be using a t2.micro EC2 instance running Amazon Linux AMI (ami-d41d58a7). Once the EC2 instance is up-and-running, connect to your server via ssh
sudo yum update -y| 1. Install Linux updates, set time zones, followed by GCC and Make | |
| sudo yum -y update | |
| sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \ | |
| /etc/localtime | |
| sudo yum -y install gcc make | |
| 2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download) |