Skip to content

Instantly share code, notes, and snippets.

View landonepps's full-sized avatar
👨‍💻
💻✈️🎙

Landon Epps landonepps

👨‍💻
💻✈️🎙
View GitHub Profile
@DabbyNdubisi
DabbyNdubisi / NavigationAllowedDismissalGesturesModifier.swift
Last active December 10, 2025 01:49
Control Interactive Dismissal of Navigation Zoom Transition SwiftUI
import SwiftUI
import UIKit
import Foundation
// MARK: - AllowedNavigationDismissalGestures
public struct AllowedNavigationDismissalGestures: OptionSet, Sendable {
public let rawValue: Int
public init(rawValue: Int) {
@L422Y
L422Y / Mass cancel Amazon Subscribe and Save.md
Last active November 9, 2025 08:52
Mass cancel Amazon Subscribe and Save
  1. Open your subscriptions page:
https://www.amazon.com/auto-deliveries/subscriptionList?shipId=mpkmmwlssrkq&ref_=mys_nav_op_D
  1. Paste into devtools console
  2. Wait a few moments, and then refresh/repeat for any additional pages
  3. Confirm by checking to see if you've received cancellation emails
@auramagi
auramagi / ReadMore.swift
Last active June 25, 2024 23:06
SwiftUI read more component. Requires iOS 16.
import SwiftUI
struct ContentView: View {
var text = "long text"
@State private var lines = 3.0
var body: some View {
ScrollView {
ReadMore(lineLimit: Int(lines)) {
@peterkos
peterkos / VariadicViewHelpers.swift
Last active May 13, 2025 17:51
Helpers for setting traits when using _VariadicView
// Generic version of https://gist.github.com/chriseidhof/5ff6ef8786f5635c18b20304ab9d9b01
extension View {
/// Convenience for setting a `_ViewTraitKey`
func withTrait<Trait, Value>(_: Trait.Type, value: Value) -> some View
where Trait: _ViewTraitKey, Value == Trait.Value
{
_trait(Trait.self, value)
}
}
@hexkpz
hexkpz / UIButton+SUI.m
Created March 11, 2024 21:35
Trigger UIMenu programmatically
//
// Created by Anton Spivak
//
#import "UIButton+SUI.h"
@import Objective;
@import ObjectiveC.runtime;
@import ObjectiveC.message;
@jkufver
jkufver / ipstocrash.pl
Last active May 16, 2024 15:35 — forked from hecht1962/ipstocrash.pl
Convert an IPS crash report (.ips) to the legacy crash report format (.crash)
#!/usr/bin/perl
##
## This script converts an IPS crash report (.ips) to the legacy crash report format.
##
## The .ips file (JSON) is read from STDIN and the legacy crash report is written to
## STDOUT.
##
use strict;
@Lessica
Lessica / fetch-libimobiledevice.sh
Created May 13, 2023 15:11
Fetch libraries and executables for macOS from libimobiledevice artifacts. This script will make executables runnable without install them to specific paths.
#!/bin/sh
set -e
if ! test -x "`which ldid`"; then
echo "Cannot find ldid, you may install it via Homebrew."
exit 1
fi
if [ ! -d "$(xcode-select -p)" ]; then
@stephancasas
stephancasas / macos-modifier-keys-dec-map.json
Last active December 2, 2025 05:07
macOS Modifier Keys Decimal Values Map
{
"65536": [
"alphashift"
],
"131072": [
"shift"
],
"196608": [
"alphashift",
"shift"
@chriseidhof
chriseidhof / ContentView.swift
Last active May 9, 2025 15:12
Variadic Views
import SwiftUI
struct MyValue: _ViewTraitKey {
static var defaultValue: Int = 0
}
extension View {
func myValue(_ value: Int) -> some View {
_trait(MyValue.self, value)
}
@IanKeen
IanKeen / EnvironmentValues.swift
Last active September 17, 2025 18:16
SwiftUI: Peek at/extract hidden environment values
import Foundation
import SwiftUI
extension EnvironmentValues {
public func value<T>(_: T.Type = T.self, forKey key: String) -> T? {
guard let value = first(where: { name($0, equals: key) }) else {
print("No EnvironmentValue with key '\(key)' found.")
return nil
}