Skip to content

Instantly share code, notes, and snippets.

View 128keaton's full-sized avatar

Keaton Burleson 128keaton

View GitHub Profile
@128keaton
128keaton / install_ffmpeg.sh
Last active November 17, 2021 06:48 — forked from Piasy/install_ffmpeg.sh
Install ffmpeg on macOS via homebrew with all the options (minus chromaprint and decklink), updated for latest Homebrew version
#!/bin/bash
brew uninstall --force --ignore-dependencies ffmpeg
brew install chromaprint amiaopensource/amiaos/decklinksdk
brew tap homebrew-ffmpeg/ffmpeg
brew install ffmpeg
brew install --cask xquartz
brew upgrade homebrew-ffmpeg/ffmpeg/ffmpeg $(brew options homebrew-ffmpeg/ffmpeg/ffmpeg | grep -vE '\s' | grep -- '--with-' | grep -vi 'chromaprint\|decklink' | tr '\n' ' ')
@128keaton
128keaton / flashScreen.swift
Created August 29, 2019 01:46 — forked from bgreenlee/flashScreen.swift
Flashing the screen in Swift. Sticking this here because it took me a while to work out the right variable types and casting.
func flashScreen() {
let inDuration: CGDisplayFadeInterval = 0.0
let outDuration: CGDisplayFadeInterval = 1.0
let color = NSColor.white
var fadeToken: CGDisplayFadeReservationToken = 0
let colorToUse = color.usingColorSpaceName(NSColorSpaceName.calibratedRGB)!
let err = CGAcquireDisplayFadeReservation(inDuration + outDuration, &fadeToken)
if err != CGError.success {
@128keaton
128keaton / license
Last active April 5, 2017 18:09 — forked from zzot/license
MIT License Generator
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
#!/bin/sh
echo "Copyright (c) `date +%Y` Keaton Burleson
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@128keaton
128keaton / dash-listen-3.py
Last active July 9, 2016 06:14 — forked from ibrahima/dash-listen-3.py
Amazon Dash Button ARP listener script (not written by me)
import socket
import struct
import binascii
# Written by Bob Steinbeiser (https://medium.com/@xtalker)
rawSocket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW,
socket.htons(0x0003))
MAC = '74c24671971c'