Skip to content

Instantly share code, notes, and snippets.

View kernjackson's full-sized avatar

Kern Jackson kernjackson

View GitHub Profile
@kernjackson
kernjackson / rm-google-chrome.sh
Created December 19, 2024 16:20
Completely Uninstalls Google Chrome from macOS
#!/bin/bash
echo "Starting the removal of Google Chrome and its associated files..."
# Function to delete a folder or file with confirmation
delete_item() {
if [ -e "$1" ]; then
read -p "Are you sure you want to delete: $1? (y/n) " confirm
if [[ $confirm == [yY] ]]; then
echo "Deleting: $1"
@kernjackson
kernjackson / Analyze SwiftUI Components with `otool`.md
Last active December 17, 2024 17:07
Use `otool` to Analyze Which Specific SwiftUI Components Are Linked Against a Binary

Use otool to Analyze Which Specific SwiftUI Components Are Linked Against a Binary

We can analyze which specific SwiftUI components are linked against a binary.

$ man otool
...
-I Display the indirect symbol table.
...
-v Display verbosely (symbolically) when possible.
//
// ValueWrapper.swift
// ADKATech.com
//
// Created by Amr Elghadban on 9/20/18.
// Copyright © 2018 Mobile DevOps. All rights reserved.
//
import Foundation
//
// ValueWrapper.swift
// ADKATech.com
//
// Created by Amr Elghadban on 9/20/18.
// Copyright © 2018 Mobile DevOps. All rights reserved.
//
import Foundation
@kernjackson
kernjackson / README.md
Created June 14, 2022 18:30 — forked from IsaacXen/README.md
(Almost) Every WWDC videos download links for aria2c.
@kernjackson
kernjackson / AppStoreOverlay.swift
Created January 23, 2022 19:21
SwiftUI SKOverlay to Display App Store Link in apps or clips
import SwiftUI
import StoreKit
struct Content: View {
var body: some View {
AppStoreOverlay(id: "1234567890")
}
}
struct AppStoreOverlay: View {
@kernjackson
kernjackson / SimultaneousContrastIllusion.swift
Created June 6, 2021 15:36
Simultaneous Contrast Optical Illusion
import SwiftUI
struct ContentView: View {
var body: some View {
ZStack {
gradient
SquareView(position: CGPoint(x: 100, y: 100))
}
.ignoresSafeArea()
}
import SwiftUI
// MARK: RadioButtons
struct RadioButtons: View {
var questions: [String] = ["Yes", "No"]
@Binding var selected: Int?
var onSymbol = "largecircle.fill.circle"
var offSymbol = "circle"
@kernjackson
kernjackson / BlurView.swift
Created September 5, 2020 02:04
SwiftUI BlurView (Wrapped)
struct BlurView: UIViewRepresentable {
var style: UIBlurEffect.Style
init(_ style: UIBlurEffect.Style) {
self.style = style
}
func makeUIView(context: Context) -> UIVisualEffectView {
@kernjackson
kernjackson / MultipleSheets.swift
Created September 3, 2020 23:19
Multiple SwiftUI Sheets via Composition
import SwiftUI
struct ContentView: View {
var body: some View {
List {
MyButton(title: "Button 1")
MyButton(title: "Button 2")
}
}
}