Skip to content

Instantly share code, notes, and snippets.

@biosmanager
biosmanager / userChrome.css
Last active January 27, 2024 13:12
Firefox Proton macOS Close Tab Left (updated for version 113)
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.tabbrowser-tab .tab-close-button {
opacity: 0;
margin-left: -4.5px !important;
margin-right: 2px !important;
}
.tabbrowser-tab:not(:hover) .tab-close-button {
display: none;
@joshdholtz
joshdholtz / Fastfile
Last active February 23, 2022 18:33
Check if fastlane is building in Xcode run script
lane :build do
gym(
xcargs: "FASTLANE=true"
)
end
@IsaacXen
IsaacXen / README.md
Last active May 24, 2024 10:37
(Almost) Every WWDC videos download links for aria2c.
@filsv
filsv / WatchSessionManager.swift
Last active April 8, 2023 21:33
WatchConnectivity Singleton (Swift 5+, iOS+WatchOS Targets) + How to (comment below)
import WatchConnectivity
class WatchSessionManager: NSObject, WCSessionDelegate {
static let sharedManager = WatchSessionManager()
private override init() {
super.init()
}
private let session: WCSession? = WCSession.isSupported() ? WCSession.default : nil
@bgromov
bgromov / readme.md
Last active September 30, 2023 15:35
Compiling Swift framework with mixed-in Objective-C code

Problem

You can't use bridging headers within a framework.

Solution 1 (umbrella header):

Xcode will automatically create umbrella header for you Cocoa Framework project. That will be the file named <FrameworkName>.h in the <FrameworkName> group/folder (where the rest of your sources are).

  1. To include the required Obj-C header you need to set it as Public: select it in the project explorer (left pane) and change the property Target Membership (left—Inspectors—pane) from Project to Public.
  2. Open umbrella header (<FrameworkName>.h) and import the required header as:
@shaps80
shaps80 / AVPlayer+Scrubbing.swift
Last active May 18, 2024 21:57
Enables smooth frame-by-frame scrubbing (in both directions) – similar to Apple's applications.
public enum Direction {
case forward
case backward
}
internal var player: AVPlayer?
private var isSeekInProgress = false
private var chaseTime = kCMTimeZero
private var preferredFrameRate: Float = 23.98
@MarcoSantarossa
MarcoSantarossa / AsyncOperation.swift
Last active August 2, 2023 13:23
How to write and use an asynchronous operation
import Foundation
class AsyncOperation: Operation {
enum State: String {
case isReady, isExecuting, isFinished
}
override var isAsynchronous: Bool {
return true
}
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 23, 2024 03:59
Swift Concurrency Manifesto
@troyfontaine
troyfontaine / 1-setup.md
Last active May 12, 2024 15:17
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.