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

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