Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active June 27, 2024 18:48
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:

@cedrickchee
cedrickchee / llama-7b-m1.md
Last active July 2, 2024 17:20
4 Steps in Running LLaMA-7B on a M1 MacBook with `llama.cpp`

4 Steps in Running LLaMA-7B on a M1 MacBook

The large language models usability

The problem with large language models is that you can’t run these locally on your laptop. Thanks to Georgi Gerganov and his llama.cpp project, it is now possible to run Meta’s LLaMA on a single computer without a dedicated GPU.

Running LLaMA

There are multiple steps involved in running LLaMA locally on a M1 Mac after downloading the model weights.

@caksoylar
caksoylar / zen-display-improvements.md
Last active May 22, 2024 15:30
Corne-ish Zen display improvements

Display improvements for the Corne-ish Zen keyboard

This note details the changes made to the Zen and ZMK codebase to improve the experience of e-ink displays.

Getting the changes

You can test out below changes using your Zen config repo by modifying your config/west.yml file, following ZMK instructions:

manifest:
  remotes:
 - name: caksoylar
@burritosoftware
burritosoftware / ultimateguidetoaltstore.md
Last active December 2, 2022 09:07
The Ultimate Guide to Troubleshooting AltStore

The Ultimate Guide to Troubleshooting AltStore

Having issues with AltStore? This is the right place for you.

Wi-Fi Sideloading/Refreshing Is Not Working

  • Check that your Mac or PC and your device are connected to the same network.

  • Check that iTunes/Finder Wi-Fi Sync is turned on.

    1. Plug in your device to your computer.
    2. Launch iTunes (or Finder on Catalina and later).
  1. Select your device in the sidebar or top bar.
// Run any SwiftUI view as a Mac app.
import Cocoa
import SwiftUI
NSApplication.shared.run {
VStack {
Text("Hello, World")
.padding()
.background(Capsule().fill(Color.blue))
@jfcherng
jfcherng / st4-changelog.md
Last active April 20, 2024 00:25
Sublime Text 4 changelog just because it's not on the official website yet.
@IanColdwater
IanColdwater / twittermute.txt
Last active July 2, 2024 02:25
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
import { writable, get } from 'svelte/store';
function makeBroadcastChannelSharedStore(name) {
let channel;
let receivedInitialValue = false;
function sendMessage(action, value = null) {
if (channel) {
channel.postMessage({ action, value });
}
@timdown
timdown / range_selection_save_restore.js
Last active July 4, 2024 09:50
Range and selection marker-element-based save and restore
/**
* This is ported from Rangy's selection save and restore module and has no dependencies.
* Copyright 2019, Tim Down
* Licensed under the MIT license.
*
* Documentation: https://github.com/timdown/rangy/wiki/Selection-Save-Restore-Module
* Use "rangeSelectionSaveRestore" instead of "rangy"
*/
var rangeSelectionSaveRestore = (function() {
var markerTextChar = "\ufeff";
@bellbind
bellbind / DisplayMode.swift
Last active January 11, 2023 16:55
[macos][c]commandline for display and switch display mode
#!/usr/bin/env swift
// swiftc displaymode1.swift
import Foundation
import CoreGraphics
let display = CGMainDisplayID()
guard let dmodes = CGDisplayCopyAllDisplayModes(display, nil) as? [CGDisplayMode] else {exit(1)}
let argv = CommandLine.arguments
if argv.count == 2 {