Skip to content

Instantly share code, notes, and snippets.

# Homebrew has done away with options in all of their core formulas
# discussion on this change here: https://github.com/Homebrew/homebrew-core/issues/31510
# Instead, Use the last version of the homebrew forumla that still supported them.
# the formula is here: https://raw.githubusercontent.com/Homebrew/homebrew-core/90e6931235a333899bd2572353ca065bd5535452/Formula/ffmpeg.rb
# install it like this:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/90e6931235a333899bd2572353ca065bd5535452/Formula/ffmpeg.rb \
--with-aom \
--with-chromaprint \
@dnicolson
dnicolson / iOSKeyboardEscapeKeyEnablerBluetooth.c
Created January 23, 2019 23:47
Support for the corner home button on an iOS keyboard to act as an escape key by analysing Bluetooth packets
// clang -framework Carbon iOSKeyboardEscapeKeyEnablerBluetooth.c -o iOSKeyboardEscapeKeyEnablerBluetooth
// sudo ./iOSKeyboardEscapeKeyEnablerBluetooth
#include <stdio.h>
#include <stdlib.h>
#include <Carbon/Carbon.h>
void TriggerEscKey()
{
CGEventRef event;
@labeneator
labeneator / etc_cron.d_ubnt_metrics
Last active August 28, 2021 17:40
Script to send SNMP metrics from Ubiquiti devices to graphite.
* * * * * root /usr/local/bin/send_metrics.sh
@dnicolson
dnicolson / dropbox-git.sh
Created November 4, 2018 16:35
Clone a bare git repo from Dropbox
curl -L https://www.dropbox.com/sh/xxx/yyy > project.git.zip
mkdir project.git
unzip project.git.zip -d project.git
git clone project.git
rm project.git.zip
rm -rf project.git
Ranked by discretionary assets managed in hedge funds worldwide, in millions, as of June 30, 2018, unless otherwise noted.
Rank Manager Assets Change from 2017
1 Bridgewater Associates $132,756 7.9%
2 AQR Capital Mgmt. $83,700 9.2%
3 Man Group $59,100 11.3%
4 Renaissance Technologies $57,000 17.3%
5 Two Sigma Inv./Two Sigma Advisers $38,800 9.6%
6 Millennium Mgmt. $35,314 2.7%
7 Elliott Management $35,000 7.0%
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active April 19, 2025 05:21
Byte formatting for Google Sheets
@miguelmota
miguelmota / process_names.txt
Last active August 13, 2024 09:58
macOS process whitelist
# not an exhaustive list
nsurlsessiond "icloud sync"
fseventsd "macos file system events"
WindowServer "macos windows"
DisplayLinkManager "macos driver"
configd "macos dynamic configuration"
displaypolicyd "macos process"
CommCenter "macos keychain"
kernel_task "macos kernel"
@Jahhein
Jahhein / README.md
Last active November 2, 2024 03:12
Display Apple AirPods battery levels via Terminal

Update: New output icon glyph

You can find information on my terminal configuration here

# python3 version, derived from python2 version https://gist.github.com/dergachev/7028596
#
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python3 simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
@ysimonson
ysimonson / bluetooth_sleep.lua
Last active October 15, 2024 15:43
Hammerspoon script to disable bluetooth when the computer is put to sleep. Requires `blueutil` to be installed (`brew install blueutil`).
require "string"
function checkBluetoothResult(rc, stderr, stderr)
if rc ~= 0 then
print(string.format("Unexpected result executing `blueutil`: rc=%d stderr=%s stdout=%s", rc, stderr, stdout))
end
end
function bluetooth(power)
print("Setting bluetooth to " .. power)