Skip to content

Instantly share code, notes, and snippets.

View briannadoubt's full-sized avatar

Brianna Zamora briannadoubt

View GitHub Profile
@KazaiMazai
KazaiMazai / CollectionView.swift
Last active May 7, 2025 07:35
Better SwiftUI wrapper for UICollectionView
import SwiftUI
extension CollectionView {
typealias UIKitCollectionView = CollectionViewWithDataSource<SectionIdentifierType, ItemIdentifierType>
typealias DataSource = UICollectionViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType>
typealias Snapshot = NSDiffableDataSourceSnapshot<SectionIdentifierType, ItemIdentifierType>
typealias UpdateCompletion = () -> Void
}
struct CollectionView<SectionIdentifierType, ItemIdentifierType>
@skreutzberger
skreutzberger / ubuntu-swift301.sh
Last active November 9, 2017 02:25
Install Swift 3.0.1 on Ubuntu
sudo apt-get install clang libicu-dev libcurl4-openssl-dev lldb git wget unzip -y
wget https://swift.org/builds/swift-3.0.1-release/ubuntu1604/swift-3.0.1-RELEASE/swift-3.0.1-RELEASE-ubuntu16.04.tar.gz
tar zxf swift-3.0.1*.tar.gz && rm -rf swift-3.0.1*.tar.gz
sudo mv swift-3.0.1* /swift-3.0.1
echo "export PATH=/swift-3.0.1/usr/bin:\"\${PATH}\"" >> ~/.bashrc
source ~/.bashrc
@bzerangue
bzerangue / _verify-repair-permissions-disk.md
Last active June 17, 2025 22:32
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

[abc] A single character: a, b or c
[^abc] Any single character but a, b, or c
[a-z] Any single character in the range a-z
[a-zA-Z] Any single character in the range a-z or A-Z
^ Start of line
$ End of line
\A Start of string
\z End of string
. Any single character
\s Any whitespace character