Skip to content

Instantly share code, notes, and snippets.

View luckman212's full-sized avatar

Luke Hamburg luckman212

View GitHub Profile
@luckman212
luckman212 / AerialLog.txt
Created January 18, 2022 12:48
Aerial 3.0.0 debug log
```
2022-01-17 15:59:40.948 : > Running under Aerial Companion!
2022-01-17 15:59:40.948 : avInit .saver (0.0, 0.0, 0.0, 0.0) p: true o: true
2022-01-17 15:59:40.948 : Running under companion in preview mode, preventing setup
2022-01-17 15:59:40.949 : PWC2 wdl: Aerial version Version 3.0.0
2022-01-17 15:59:40.964 : /PWC2 wdl
2022-01-17 15:59:40.965 : Creating app support directory...
2022-01-17 15:59:40.976 : tvOS 15 is not cached, downloading...
2022-01-17 15:59:40.988 : Parsed From Joshua Michaels & Hal Bergman
2022-01-17 15:59:40.989 : Sources loaded
@luckman212
luckman212 / popper.lua
Last active January 31, 2022 05:42
quick popup note window for Hammerspoon
-- popper.lua
-- https://www.hammerspoon.org/docs/hs.webview.html
src=[[<html>
<head>
<style>
::-webkit-scrollbar {
background: #2d2e26;
width: 8px;
@luckman212
luckman212 / init.lua
Created January 2, 2022 18:28
init.lua for Hammerspoon to test window animations - see https://github.com/Hammerspoon/hammerspoon/issues/3035
x = hs.timer.doEvery(1,
function()
w = hs.console.hswindow()
if w then
w:move(
{
x=math.random(500),
y=math.random(500),
w=math.random(1000),
h=math.random(1000)
@luckman212
luckman212 / animations.sh
Created December 29, 2021 22:33
Enable / Disable / Revert animation-related tweaks to macOS
#!/usr/bin/env bash
function _nl() {
read -r LINE
echo "${LINE:-null}"
}
function _write() {
defaults write -g NSAutomaticWindowAnimationsEnabled -bool false
defaults write -g NSScrollAnimationEnabled -bool false
@luckman212
luckman212 / pkg_check.php
Created December 28, 2021 21:34
pfSense auto-update check (pushover version)
<?php
require_once("pkg-utils.inc");
require_once("notices.inc");
require_once("util.inc");
$msg = null;
$pmsg = null;
$p = 0;
@luckman212
luckman212 / rgr
Created December 23, 2021 18:25
rgr: quick in-place search and replace using ripgrep + gsed
#!/usr/bin/env bash
case $1 in
-h|--help|'') echo "usage: ${0##*/} <old> <new>"; exit;;
esac
export old="\b$1\b"
export new=$2
rg --files-with-matches -0 "${old}" |
@luckman212
luckman212 / devteamid.sh
Created December 23, 2021 16:21
grab Apple DEVELOPMENT_TEAM ID from Keychain
#!/usr/bin/env bash
#requires openssl@3 from Homebrew
_openssl=$(brew --prefix openssl 2>/dev/null)/bin/openssl
[[ -x $_openssl ]] || { echo "missing openssl, try \`brew install openssl\`"; exit 1; }
#find development cert
id=$(security find-identity -v -p codesigning | head -1)
[[ -n $id ]] || exit 1
cn=$(sed -En 's/^.*Apple Development.*\((.*)\).*$/\1/p' <<<"$id")
@luckman212
luckman212 / gist:b4d4ee80bbea5bdfae741213b2d29ae0
Created December 23, 2021 15:31
Netgate 6100 - CORDOBA BOOT 02.02.00.00t-uc-15
02.02.00.00t-uc-15
@luckman212
luckman212 / float2.lua
Created December 14, 2021 15:06
Hammerspoon module for draggable live updating floating preview windows
--[[ Live-updating floating previews
https://www.hammerspoon.org/docs/hs.window.html
https://www.hammerspoon.org/docs/hs.canvas.html
https://www.hammerspoon.org/docs/hs.image.html
https://www.hammerspoon.org/docs/hs.mouse.html
https://www.hammerspoon.org/docs/hs.timer.html
https://www.lua.org/manual/5.4/manual.html#6.2 (coroutines)
https://github.com/Hammerspoon/hammerspoon/issues/2710#issuecomment-788266990 (thanks @asmagill)
@luckman212
luckman212 / brew-recent.sh
Last active December 23, 2021 03:23
Find recently updated Homebrew formulae
#!/usr/bin/env bash
# https://apple.stackexchange.com/questions/304345/show-installation-date-of-packages-installed-with-homebrew/432218#432218
# https://apple.stackexchange.com/questions/373442/how-to-generate-list-of-homebrew-formulas-packages-sorted-by-most-recently-upda/
#default timeframe
tf=1d
case $1 in
-h|--help) echo "usage: ${0##*/} [time] e.g. 90m, 1h, 3d (default: $tf)"; exit;;