Skip to content

Instantly share code, notes, and snippets.

View skyfallsin's full-sized avatar

Pradeep Elankumaran skyfallsin

View GitHub Profile
@rcrowley
rcrowley / multio.rb
Created July 28, 2010 06:15
Ruby IO multiplexer
# MultIO Ruby IO multiplexer
# http://rcrowley.org/2010/07/27/multio-ruby-io-multiplexer.html
require 'stringio'
class MultIO < Array
def <<(io)
if io.respond_to?(:to_str)
io = StringIO.new(io)
@rjw57
rjw57 / CGSPrivate.h
Last active February 14, 2025 00:41
CGSPrivate.h - undocumented APIs for OSX. Re-licensed under MIT licence.
/* CGSPrivate.h -- Header file for undocumented CoreGraphics stuff. */
/* This file is a relicensed portion of DesktopManager and was originally released under
* the terms of the GNU General Public Licence. Original licence text follows the new terms.
* The contents of this file has been re-released by the original author under the following terms:
*
* Copyright (C) 2003, 2004, 2013 Richard J Wareham <[email protected]>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this
* software and associated documentation files (the "Software"), to deal in the Software
@rmcdongit
rmcdongit / macOS_SytemPrefs.md
Last active May 7, 2025 12:57
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@hiepnp1990
hiepnp1990 / accessibility_notifications.swift
Created October 10, 2024 13:55
MacOS Accessibility API Notifications
//
// MacOS Accessibility Notifications
// Notice: this version doesn't take into account new apps after this code is executed
// Created by Phi Hiep Nguyen and AI on 2024-10-08.
//
import Cocoa
import Foundation
// AppObserver: Monitors and reports application activation events on macOS