Skip to content

Instantly share code, notes, and snippets.

@kconner
kconner / macOS Internals.md
Last active May 6, 2024 22:20
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:

@caksoylar
caksoylar / zen-display-improvements.md
Last active April 12, 2024 09:33
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.
@insdavm
insdavm / wireguard-over-tcp.md
Last active April 29, 2024 20:09
WireGuard over TCP with udptunnel

WireGuard over TCP with udptunnel

udptunnel is a small program which can tunnel UDP packets bi-directionally over a TCP connection. Its primary purpose (and original motivation) is to allow multi-media conferences to traverse a firewall which allows only outgoing TCP connections.

Server

# udptunnel -s 443 127.0.0.1/51820

Client

@chriseidhof
chriseidhof / boilerplate.swift
Last active January 3, 2024 05:54
QuickMacApp
// 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 April 22, 2024 17:26
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 January 27, 2024 18:41
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 {