Skip to content

Instantly share code, notes, and snippets.

View canering's full-sized avatar

eg canering

View GitHub Profile
@othyn
othyn / 00_local_llm_guide.md
Last active April 28, 2025 23:20
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

@talkingmoose
talkingmoose / Sequoia-compatible Macs (regex)
Last active March 31, 2025 16:32
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
Verification: https://regex101.com/r/bNOMXz/9
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+$
@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")
@mathix420
mathix420 / medium.user.js
Last active April 28, 2025 19:20
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.4
// @inject-into content
@susanBuck
susanBuck / .bash_aliases
Last active February 10, 2024 14:34
Bash Aliases
# Edit the bashrc file
alias configedit='code ~/.bashrc'
# Edit the alias config file
alias configalias='code ~/.bash_aliases'
# Recognize changes to bashrc config
# (which will also recognize changes to the alias config file)
alias configrefresh='source ~/.bashrc'
@kconner
kconner / macOS Internals.md
Last active April 24, 2025 10:08
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@PicoMitchell
PicoMitchell / rosetter.sh
Last active January 4, 2024 17:22
"rosetter" is a shell/CLI tool to enable (or disable) opening apps using Rosetta on Apple Silicon Macs (as if you had clicked the "Open using Rosetta" checkbox in Finder).
#!/bin/sh
rosetter() ( # Notice "(" instead of "{" for this function, see THIS IS A SUBSHELL FUNCTION comments below.
# ABOUT ROSETTER
# "rosetter" is a shell/CLI tool to enable (or disable) opening apps using Rosetta on Apple Silicon Macs (as if you had clicked the "Open using Rosetta" checkbox in Finder).
# To enable opening apps using Rosetta, simply pass "rosetter" the app path(s) and/or bundle identifier(s) as arguments that you would like to enable opening using Rosetta (multiple app paths and/or bundle identifiers can be enabled at once).
# To disable opening apps using Rosetta, include the "--disable" (or "-d") argument along with the app path(s) and/or bundle identifier(s).
##
@PicoMitchell
PicoMitchell / get_compatible_macos_versions-asls.sh
Last active March 13, 2025 03:32
Scripts to get compatible macOS versions from Apple Software Lookup Service (gdmf.apple.com/v2/pmv) or Software Update Catalog (swscan.apple.com[...]sucatalog).
#!/bin/bash
#
# Created by Pico Mitchell (of Random Applications) on 1/5/23
#
# https://gist.github.com/PicoMitchell/877b645b113c9a5db95248ed1d496243#file-get_compatible_macos_versions-asls-sh
#
# MIT License
#
# Copyright (c) 2023 Pico Mitchell (Random Applications)
@dvessel
dvessel / macOS_SytemPrefs.md
Created April 15, 2023 15:29 — forked from rmcdongit/macOS_SytemPrefs.md
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
@JayBrown
JayBrown / applaunched.sh
Last active June 4, 2023 21:14
macOS LSIsAppleDefaultNoOverrideForType to automatically open pkg or mpkg installer files in Suspicious Package or Pacifist in addition to macOS Installer app / prerequisites: EventScripts app or NSWorkspaceNotifications observer for NSWorkspaceDidLaunchApplicationNotification
#!/bin/zsh
# shellcheck shell=bash
# applaunched v0.2
export LANG=en_US.UTF-8
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/local/bin:/opt/local/sbin:"$HOME"/.local/bin:"$HOME"/.local/sbin
logloc="/tmp/local.$(id -un).applaunched.log"
exec > >(tee -a "$logloc") 2>&1