Skip to content

Instantly share code, notes, and snippets.

View canering's full-sized avatar

eg canering

View GitHub Profile
@wstein
wstein / FAQ.md
Last active November 25, 2025 10:28
Homebrew Analytics Data

Frequently Asked Questions about Homebrew Formulae Analytics

What kind of data is presented in this source?

This source provides analytics data for various software packages, referred to as "formulae," available through the Homebrew package manager. The data includes statistics on how many times each formula has been downloaded or accessed within the last 30, 90, and 365 days. Additionally, it offers a brief description of each formula, its official homepage URL, and the method by which Homebrew fetches the package (typically "homebrew" or "repo_direct" for formulae from specific taps). Some formulae also include information about their definition file path within their respective repositories and their current version.

What does the "formula" type indicate?

In the context of Homebrew, a "formula" is a Ruby script that describes how to download, build, and install a particular piece of software. The prevalence of the "formula" type in this data suggests that it primarily tracks popular software pa

@b0gdanw
b0gdanw / Get-Sequoia-InstallAssistant-pkg-links-from-Apple.sh
Last active October 4, 2025 11:20
Get Sequoia & Tahoe InstallAssistant.pkg links from Apple
@b0gdanw
b0gdanw / Disable-Sequoia-Bloatware.sh
Last active December 4, 2025 19:25
Disable Sequoia Bloatware
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13), macOS Sonoma (14) and macOS Sequoia (15)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user
@othyn
othyn / 00_local_llm_guide.md
Last active November 11, 2025 10:31
Setting up a local only LLM (Qwen/Llama3/etc.) on macOS with Ollama, Continue and VSCode

Setting up a local only LLM (Qwen/Llama3/etc.) on macOS with Ollama, Continue and VSCode

As with a lot of organisations, the idea of using LLM's is a reasonably frightning concept, as people freely hand over internal IP and sensitive comms to remote entities that are heavily data bound by nature. I know it was on our minds when deciding on LLM's and their role within the team and wider company. 6 months ago, I set out to explore what offerings were like in the self-hosted and/or OSS space, and if anything could be achieved locally. After using this setup since then, and after getting a lot of questions on it, I thought I might share some of the things I've come across and getting it all setup.

Que in Ollama and Continue. Ollama is an easy way to locally download, manage and run models. Its very familiar to Docker in its usuage, and can probably be most conceptually aligned with it in how it operates, think imag

@stephancasas
stephancasas / sysctl_inet_ports_list_copy.swift
Last active December 2, 2025 05:11
Get a list of macOS' in-use network ports.
import Foundation;
/// Copy the list of in-use network ports — optionally filtering by the ports' state.
/// - Parameters:
/// - buffer: The buffer into which the port list will populate
/// - state: The port state by which to filter.
/// - Returns: Expect `KERN_SUCCESS` if the operation was successful.
@discardableResult
func sysctl_inet_ports_list_copy(_ buffer: UnsafeMutablePointer<[UInt16]>, _ state: Int32? = nil) -> kern_return_t {
var kern_return: kern_return_t;
@talkingmoose
talkingmoose / Sequoia-compatible Macs (regex)
Last active August 30, 2025 21:44
Regex looks for all Mac models compatible with macOS Sequoia. May not be up-to-date with newly released models.
https://www.apple.com/macos/macos-sequoia/
Published Date: June 10, 2024
Updated November 8, 2024
Updated May 28, 2025
Verification: https://regex101.com/r/bNOMXz/10
1) Exact regex — Matches major model identifier numbers based on Apple's knowledge base article (more accurate):
^(Mac(1[3-6]|BookPro1[5-8]|BookAir(9|10)|Pro7)|iMac(Pro1|(19|2[01]))|Macmini[89]),\d+$
@gruber
gruber / Split Tabs to New Window.scpt
Last active December 1, 2025 22:56
An AppleScript for Safari to move all tabs in the frontmost window, from the current tab to the rightmost (last) tab, to a new window.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
(*
Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window)
Much more elegant version: Leon Cowle (https://github.com/leoncowle)
Even more elegant version: https://stackoverflow.com/questions/54066100/applescript-to-split-safari-tabs-into-new-window/54089865#54089865
Worth a warning: "moving" tabs with this script doesn't actually move them like
drag-and-drop does. The tabs "moved" by this script will reload in the new window,
@elmimmo
elmimmo / export_snippets.py
Last active February 14, 2025 11:22
Export snippets stored in Dash by kapeli.com to text files
import sqlite3
import os
# Connect to the SQLite database
db_path = "dash snippets.dash" # Path to the SQLite database file
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
# Query to retrieve records from the "snippets" table
cursor.execute("SELECT sid, title, body, syntax FROM snippets")
#!/bin/zsh
# WARNING! The script is meant to show how and what can be disabled. Don’t use it as it is, adapt it to your needs.
# Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Disabling unwanted services on macOS Big Sur (11), macOS Monterey (12), macOS Ventura (13) and macOS Sonoma (14)
# Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
# Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist, disabled.501.plist
# To revert, delete /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist and reboot; sudo rm -r /private/var/db/com.apple.xpc.launchd/*
# user