Skip to content

Instantly share code, notes, and snippets.

View ink-splatters's full-sized avatar

Peter A. ink-splatters

View GitHub Profile
@ink-splatters
ink-splatters / add_debug_entitlement.sh
Created October 29, 2023 05:33 — forked from talaviram/add_debug_entitlement.sh
Simple Utility Script for allowing debug of hardened macOS apps.
#! /bin/bash
# Simple Utility Script for allowing debug of hardened macOS apps.
# This is useful mostly for plug-in developer that would like keep developing without turning SIP off.
# Credit for idea goes to (McMartin): https://forum.juce.com/t/apple-gatekeeper-notarised-distributables/29952/57?u=ttg
# Update 2022-03-10: Based on Fabian's feedback, add capability to inject DYLD for sanitizers.
#
# Please note:
# - Modern Logic (on M1s) uses `AUHostingService` which resides within the system thus not patchable and REQUIRES to turn-off SIP.
# - Some hosts uses separate plug-in scanning or sandboxing.
# if that's the case, it's required to patch those (if needed) and attach debugger to them instead.
@ink-splatters
ink-splatters / gen-fstab-nomount-entries.sh
Created October 17, 2023 14:45
generate /etc/fstab nomount entries from APFS container volumes
#!/usr/bin/env bash
set -e
set -o pipefail
disk=$(echo "$1" | sed -E 's/^\/dev\///g')
if [[ $# != 1 || ! "$disk" =~ disk[0-9]$ ]]; then
cat <<EOF
usage: $0 <APFS container node>
EOF
@ink-splatters
ink-splatters / README.en.md
Created July 18, 2023 23:46 — forked from akihikodaki/README.en.md
Linux Desktop on Apple Silicon in Practice

Linux Desktop on Apple Silicon in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?

  • Two native ports exist.

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096

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:

@ink-splatters
ink-splatters / wal_crawler.py
Created May 29, 2023 14:50
WAL crawler from "Learning Python for Forensics"
# CREDITS: https://github.com/PacktPublishing/Learning-Python-for-Forensics/blob/master/Chapter%2012/wal_crawler.py
import argparse
import binascii
import csv
import logging
import os
import re
import struct
import sys
@ink-splatters
ink-splatters / DiskUtil.sh
Created April 21, 2023 18:08 — forked from joevt/DiskUtil.sh
macOS disk labels, mounting partitions
#!/bin/bash
# by joevt May 23, 2022
directblesscmd="/Volumes/Work/Programming/XcodeProjects/bless/bless-204.40.27 joevt/DerivedData/bless/Build/Products/Debug/bless"
usedirectbless=0
if [[ -d /System/Library/PrivateFrameworks/APFS.framework/Versions/A ]]; then
if [[ ! -f "$directblesscmd" ]]; then
echo "# Download and build bless from https://github.com/joevt/bless , then update the path of directbless defined in DiskUtil.sh"
else
usedirectbless=1
@ink-splatters
ink-splatters / nix-home-manager-neovim-setup.md
Created February 4, 2023 01:01 — forked from nat-418/nix-home-manager-neovim-setup.md
Manage Neovim plugins (and more!) with Nix and Home Manager

Manage Neovim plugins (and more!) with Nix and Home Manager

Highly extensible software like Emacs, Vim, and Neovim tend to grow their own package managers. A software developer, for example, might want to install editor plugins that hook into a particular programming language's linter or language server. The programmer's text editor is therefore extended to support managing additional software to extend the text editor. If this loop continues for too long, the programmer's editor becomes more delicate and complex. The remedy for this problem is to manage software using dedicated tools apart

@ink-splatters
ink-splatters / profile_defaults.md
Created September 13, 2022 19:54 — forked from dlevi309/profile_defaults.md
An extensive list of settings written when installing a debugging profile from developer.apple.com

Digital Car Key:

Has three sections.

defaults: {
    “com.apple.MobileBluetooth.debug” =     {
        ExtraZoningLog =         {
            EnableZoneLogging = 1;
        };
        FWStreamLogging =         {
@ink-splatters
ink-splatters / spectrum.py
Created August 8, 2022 01:40 — forked from netom/spectrum.py
Simple spectrum analyzer in python using pyaudio and matplotlib
#!/usr/bin/env python
# -*- charset utf8 -*-
import pyaudio
import numpy
import math
import matplotlib.pyplot as plt
import matplotlib.animation
RATE = 44100