Skip to content

Instantly share code, notes, and snippets.

View kingnight's full-sized avatar
🎯
Focusing

jinkai kingnight

🎯
Focusing
View GitHub Profile
@kingnight
kingnight / sendmail_setup.md
Created January 15, 2021 11:29 — forked from kany/sendmail_setup.md
Setup SENDMAIL on Mac OSX Yosemite
Incident Identifier: 99b0c74e-b9a1-4499-a062-013b6d4eb33a
CrashReporter Key: 7862DD8B-9A2B-438B-A9D2-5499ABA916D5
Hardware Model: iPhone11,8
Process: sohuhy [16580]
Path: /private/var/containers/Bundle/Application/381112DE-2082-468B-A3E2-451408B885E2/sohuhy.app/sohuhy
Identifier: com.sohu.sohuhy
Version: 5.20.0 (5)
Code Type: arm64
Parent Process: [1]
@kingnight
kingnight / xcframework_realm.sh
Created May 15, 2022 08:42 — forked from leemaguire/xcframework_realm.sh
Remove naming collisions in swiftinterface. Run this script in the root of the RealmSwift.xcframework folder
#!/bin/bash
set -o pipefail
set -e
find . -name "*.swiftinterface" -exec sed -i -e 's/Realm\.//g' {} \;
find . -name "*.swiftinterface" -exec sed -i -e 's/import Private/import Realm.Private/g' {} \;
find . -name "*.swiftinterface" -exec sed -i -e 's/RealmSwift.Configuration/RealmSwift.Realm.Configuration/g' {} \;
find . -name "*.swiftinterface" -exec sed -i -e 's/extension Configuration/extension Realm.Configuration/g' {} \;
find . -name "*.swiftinterface" -exec sed -i -e 's/RealmSwift.Error/RealmSwift.Realm.Error/g' {} \;
find . -name "*.swiftinterface" -exec sed -i -e 's/extension Error/extension Realm.Error/g' {} \;
@kingnight
kingnight / StopJumpingTableViewOnInsertRows.swift
Created July 7, 2022 06:19 — forked from joshdholtz/StopJumpingTableViewOnInsertRows.swift
Used when loading more data into UITableView for a smooth "infinite scroll" feel
// I dont want my table jumping/animation when appending new rows
// for an infinite scroll feel
//
// Some of this might not be needed but it works
//
// TODO: Possibly garbage
extension UITableView {
func reloadDataSmoothly() {
UIView.setAnimationsEnabled(false)