In your command-line run the following commands:
brew doctor
brew update
In your command-line run the following commands:
brew doctor
brew update
# how to run this thingy | |
# create a file on your mac called setup.sh | |
# run it from terminal with: sh setup.sh | |
#!/bin/bash | |
set -euo pipefail | |
# Display message 'Setting up your Mac...' | |
echo "Setting up your Mac..." | |
sudo -v |
// Download the "video GIF" | |
let data = try! Data(contentsOf: URL(string: "https://thumbs.gfycat.com/ThankfulLawfulAsianelephant-mobile.mp4")!) | |
let fileName = String(format: "%@_%@", ProcessInfo.processInfo.globallyUniqueString, "html5gif.mp4") | |
let url = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(fileName) | |
try! data.write(to: url, options: [.atomic]) | |
// Do the converties | |
let asset = AVURLAsset(url: url) | |
guard let reader = try? AVAssetReader(asset: asset) else { | |
return |
import Foundation | |
@propertyWrapper struct Notifier<Value> { | |
private let identifier: String | |
var wrappedValue: Value? { | |
didSet { | |
NotificationCenter.default.post(name: Notification.Name(identifier), object: wrappedValue) | |
} | |
} |
$
for commands, that just shows it a bash script and is meant to be run in a terminal(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| Title | Description