Skip to content

Instantly share code, notes, and snippets.

@dvessel
dvessel / ldmame
Last active May 17, 2024 15:51
Launch MAME through fuzzy search (fzf).
#!/usr/bin/env zsh
# helper to work with rom paths easier.
# - scans for roms in current working directory.
# - first argument can be a path.
# - if it's not, pass all arguments to lmame.
local rompath=`pwd`
# first parameter can be ambigous. assume directory if it exists.
if [[ -d ${1:a} ]]; then
@hym3242
hym3242 / StandardKeyBinding.dict.dump.with.notes.txt
Last active April 14, 2025 21:16
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:"
@stephancasas
stephancasas / macos-modifier-keys-dec-map.json
Last active January 1, 2025 14:59
macOS Modifier Keys Decimal Values Map
{
"65536": [
"alphashift"
],
"131072": [
"shift"
],
"196608": [
"alphashift",
"shift"
@dvessel
dvessel / F-Zero-Sand-Ocean-Intro.dtm
Last active September 4, 2023 19:30
Dolphin graphics backend performance comparison.
@dvessel
dvessel / G2ME01.sh
Last active November 23, 2022 21:30
Command line launcher for Dolphin emulator. (MacOS)
#!/bin/zsh
# Metroid Prime 2
ignore_dir="$dump/- ignore"
linked_dir="$dump/- linked"
review_dir="$dump/- review"
mkdir -p $ignore_dir $linked_dir $review_dir $load
ln -sf $linked_dir $load
@dvessel
dvessel / link-loaded-textures
Last active November 23, 2022 21:30
Throw it into a bin path, cd into it and `chmod +x link-loaded-textures`.
@dvessel
dvessel / fbrew
Last active March 28, 2025 11:30
search through 🍺 formulae/casks with fzf. `brew install fzf` first.
#!/usr/bin/env zsh
set -e
local pkgdef _pkgdef
zparseopts -D -E - {-formula,-formulae,-cask}=_pkgdef
# conditional output based on the homebrew package definition being worked on.
# example: `c.pkgdef output-for-formula output-for-cask`
# if `--formula` is passed to this script, `output-for-formula` will be output.
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
fzf-down() {
fzf --height 50% --min-height 20 --border --bind ctrl-/:toggle-preview "$@"
}
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active March 28, 2025 20:13
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation

Install XHProf

Pear

pear upgrade PEAR
pecl install xhprof-0.9.2

From source