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 / brew_install_or_upgrade.sh
Last active March 4, 2021 22:36
HomeBrew convinience install_or_upgrade CLI func
c46ca3523b5a6da56bb25cd982c58b95_cmd() {
echo "[INFO] $@" ; sh -c "$@"
}
brew_install_or_upgrade() {
# shellcheck disable=SC2206
local tools=($@)
# shellcheck disable=SC2155
local -a installed
echo [INFO] checking installed...
@ink-splatters
ink-splatters / private_fork.md
Created March 22, 2021 15:36 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@ink-splatters
ink-splatters / osx_setup.sh
Created January 5, 2022 12:43 — forked from dannysmith/osx_setup.sh
Sensible defaults for New Mac
#!/usr/bin/env bash
# ~/.osx — http://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
// How to:
// 1) Login into https://icloud.com
// 2) Open the developer tools and execute this code in the console
// See more @ https://medium.com/bugbountywriteup/how-apple-stored-all-your-email-metadata-for-years-on-their-servers-2a61b1a3232d
const _API_URL='https://p18-mailws.icloud.com/wm/recents';
const _requestContacts = () => {
console.warn('Requesting your contacts...');
return fetch(_API_URL, {
method: 'POST',
headers: {
@ink-splatters
ink-splatters / chroot-env-on-mac.org
Created June 16, 2022 21:21 — forked from eddieh/chroot-env-on-mac.org
chroot Environments on macOS (draft)

chroot Environments on macOS

This is a draft.

macOS doesn’t have many of the advanced Linux or UNIX features that have come about in the past 20 years. So getting a proper chroot environment up and running takes a little more work.

@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
@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 / 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 / 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 / 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