Skip to content

Instantly share code, notes, and snippets.

@necaran
necaran / AltMod.md
Last active March 30, 2024 22:31
Stop Alt key from focusing menu and more with AutoHotkey

Stop Alt key from focusing menu and more with AutoHotkey

TL;DR

  • Should be less likely to have side effects such as PowerShell/PSReadLine#2036.
  • Do not reduce the code to *Alt:: and ~*Alt up::, which can behave wired with RAlt.
*LAlt::SetKeyDelay(-1), Send("{LAlt down}{Shift}"), KeyWait("LAlt")
~*LAlt up::SetKeyDelay(-1), Send("{Blind}{LAlt up}")
@hym3242
hym3242 / macOS.10.15.AppKit.symbols.dump!grep.NSKeyBindingCommands.txt
Last active November 11, 2024 22:11
dump of macOS 10.15 AppKit symbols (grep NSKeyBindingCommands)
0x000000000041e50d ( 0x205) -[NSTextView(NSKeyBindingCommands) insertTab:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000046d4ee ( 0x22d) -[NSTextView(NSKeyBindingCommands) insertNewline:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000046e21a ( 0x35a) -[NSTextView(NSKeyBindingCommands) deleteBackward:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000046e574 ( 0x358) -[NSTextView(NSKeyBindingCommands) _checkInList:listStart:markerRange:emptyItem:atEnd:inBlock:blockStart:forCharacterRange:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x0000000000471d20 ( 0x9e) -[NSTextView(NSKeyBindingCommands) deleteWordBackward:] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x000000000084cf2c ( 0xe5) -[NSTextView(NSKeyBindingCommands) _verticalDistanceForPageScroll] [FUNC, OBJC, NameNList, MangledNameNList, Merged, NList, FunctionStarts]
0x
@hym3242
hym3242 / StandardKeyBinding.dict.dump.with.notes.txt
Last active November 14, 2024 08:32
Dump of /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict on macOS Ventura 13.4, plus some notes
$ # plz forgive this dumb method of visualization.
$ cp /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict .
$ plutil -convert xml1 StandardKeyBinding.dict
$ plutil -p StandardKeyBinding.dict | unicode-vis | cat -v | tr '\t' '+'
{
"^C" => "insertNewline:"
"^H" => "deleteBackward:"
"^Y" => "insertBacktab:" //shift+tab
"^[" => "cancelOperation:"
"^?" => "deleteBackward:"
@steven-michaud
steven-michaud / ThirdPartyKexts.md
Last active November 11, 2024 21:17
Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

Running Third Party Kernel Extensions on Virtualization Framework macOS Guest VMs

As of macOS 12 (Monterey), Apple's Virtualization framework has nice support for macOS guest virtual machines, but with severe limitations: For example you can't install a macOS guest on Intel Macs, install guests with newer versions of macOS than the host, copy and paste between the host and the guest, or install third party kernel extensions in the guest. As usual for Apple, the functionality they do support is nicely implemented, but they've left out so much that the result is only marginally useful -- at least compared to

@macshome
macshome / defang.md
Last active November 5, 2024 07:09
How to defang system protections on macOS

How to Defang macOS System Protections

If you want to change things on the root drive of a Mac you will need to take some steps to disable the built in security of the system. Most of these steps are the same regardless if you are on Intel or Apple Silicon. If there is a difference it is noted.

Note that all of these things put a Mac into an unsupported and less secure state.

Make sure you either perform these steps in a VM or that you reset the protections after you are done poking around

Protections and Terms

(This list is not exahustive on the details of each. Check the links at the end for more info.)

@BlueSwordM
BlueSwordM / Decoding guide AV1 2022: Decoding and decoding aware encoding optimizations.md
Last active September 17, 2024 12:53
# Maximizing AV1 decoding speed: a modern 2022 encoding and decoding guide!

Hello. I've decided to share a lot more of my knowledge in public forums from now on, and to not divert any of my focus away from improving the world in a way that stays written in history.

This Gist is about discussing on how to improve AV1 decoding performance on 2 fronts: improving performance through more efficient decoding, and through decoding aware encoding.

Improving decoding performance through more efficient decoding.

Here are many tips on how to improve decoding performance on any machine:

1. Keep your favorite media player up to date!

@b0gdanw
b0gdanw / DisableBigSur.sh
Last active October 31, 2024 09:54
Disable Big Sur services
#!/bin/zsh
#Credit: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
#Disabling unwanted services on macOS 11 Big Sur (11) and macOS Monterey (12)
#Disabling SIP is required ("csrutil disable" from Terminal in Recovery)
#Modifications are written in /private/var/db/com.apple.xpc.launchd/ disabled.plist and disabled.501.plist
# user
TODISABLE=()
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active October 10, 2024 22:24
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

import sublime
import sublime_plugin
class FindInScope(sublime_plugin.TextCommand):
def run(self, edit, pattern='', scope='-comment'):
view = self.view
sel = view.sel()
if len(sel) > 0 and pattern == '':
@XVilka
XVilka / TrueColour.md
Last active October 29, 2024 09:43
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!