Skip to content

Instantly share code, notes, and snippets.

View nesium's full-sized avatar
🌎
Working remotely

Marc Bauer nesium

🌎
Working remotely
View GitHub Profile
@nesium
nesium / SimulatedSlowLoadingImage.swift
Created August 23, 2022 12:21 — forked from smileyborg/SimulatedSlowLoadingImage.swift
Snippet showing how to create an NSItemProvider with a simulated delay for loading an image
import UIKit
import MobileCoreServices
let image = UIImage() // your actual image
let itemProvider = NSItemProvider()
itemProvider.registerDataRepresentation(forTypeIdentifier: kUTTypeJPEG as String, visibility: .all) { (completionBlock) -> Progress? in
let unitsOfWork = 10 + Int64(arc4random_uniform(UInt32(10))) // 10 - 19 units
let progress = Progress.discreteProgress(totalUnitCount: unitsOfWork)
@nesium
nesium / semantic-commit-messages.md
Created February 27, 2022 16:03 — forked from joshbuchea/semantic-commit-messages.md
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@nesium
nesium / encoding-video.md
Created November 15, 2020 14:25 — forked from glen-cheney/encoding-video.md
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@nesium
nesium / config.yml
Last active August 19, 2019 05:10 — forked from eoger/config.yml
sccache with rust
version: 2.1
commands:
setup-sccache:
steps:
- run:
name: Install sccache
command: |
cargo install sccache
# This configures Rust to use sccache.
echo 'export "RUSTC_WRAPPER"="sccache"' >> $BASH_ENV