Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
// | |
// DebugDevice.swift | |
// | |
// Copyright 2022 • Sidetrack Tech Limited | |
// | |
import Foundation | |
// This must be called on the main-thread. | |
var isDebugProfileInstalled: Bool { |
// | |
// FreeSpaceViewController.swift | |
// Free Space | |
// | |
// Created by Kyle Howells on 04/05/2022. | |
// | |
import UIKit | |
class FreeSpaceViewController: UIViewController { |
#!/usr/bin/bash | |
# | |
# Cut a fragment of a video with the minimal possible re-encoding. | |
# If the new start point is not a key frame it reencodes the video | |
# from that point until the frame before a new keyframe. The remaining | |
# part is copied as passthrough and both fragments are concatenated | |
# | |
# In order to make the video streams compatible we use the same codec | |
# and bitrate. This works fine with h264. No idea about other codecs |
extension Error { | |
var code: Int { return (self as NSError).code } | |
var domain: String { return (self as NSError).domain } | |
var userInfo: [String:Any] { return (self as NSError).userInfo } | |
func timeAfterWhichToRetry(retryCount: Int) -> TimeInterval? { | |
// CloudKit suggests us retry too often, so slow us down as we retry a lot, up to 5 minutes | |
if let suggestedTimeout = suggestedTimeAfterWhichToRetry { | |
if suggestedTimeAfterWhichToRetry == 0 { | |
return 0 |
Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.
Informative DevForum posts from everyone's favorite DTS member.
(Arranged newest to oldest)
This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).
Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.
When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.
// | |
// Copyright © 2020 Peter Steinberger. MIT Licensed. | |
// | |
import Foundation | |
/// Text input can crash in Mac Catalyst due to a property not being atomic. | |
/// We swizzle the `documentState` property of `RTIInputSystemSession` to make it thread safe. | |
func installMacCatalystAppKitTextCrashFix() { | |
// RTIInputSystemSession is loaded later, so we will check a few times. |
You can check here for getting the latest version. Change the wget url to download newer versions.
#!/usr/bin/env python | |
'''Crop an image to just the portions containing text. | |
Usage: | |
./crop_morphology.py path/to/image.jpg | |
This will place the cropped image in path/to/image.crop.png. | |
For details on the methodology, see |
import base64 | |
import hmac | |
import hashlib | |
from urllib import parse | |
from django.contrib.auth.decorators import login_required | |
from django.http import HttpResponseBadRequest, HttpResponseRedirect | |
from django.conf import settings | |
@login_required |