Skip to content

Instantly share code, notes, and snippets.

View Clustmart's full-sized avatar

Paul Wasicsek Clustmart

View GitHub Profile
@Clustmart
Clustmart / SidecarShortcut.md
Last active July 26, 2024 07:05 — forked from sorrell/SidecarShortcut.md
Activate Sidecar Shortcut

Sidecar Shortcut

This is a list of steps for creating a keyboard shortcut to activate Sidecar (tested on macOS Sonoma).

Steps

  1. Open Automator and create a new Quick Action
  2. Select Run AppleScript as the first and only step
  3. Input the below but be sure to replace "iPad New" with your device name
on run {input, parameters}	
	tell application "System Settings"
@Clustmart
Clustmart / export-safari-bookmarks.swift
Last active July 14, 2024 11:52
Export Safari bookmarks and folder structure to ~/bookmarks.csv
import Foundation
// Define the file path to save the CSV
let filePath = FileManager.default.homeDirectoryForCurrentUser.appendingPathComponent("bookmarks.csv")
// Create the CSV file if it doesn't exist
if !FileManager.default.fileExists(atPath: filePath.path) {
FileManager.default.createFile(atPath: filePath.path, contents: nil, attributes: nil)
}