Skip to content

Instantly share code, notes, and snippets.

View aaronkollasch's full-sized avatar

Aaron Kollasch aaronkollasch

View GitHub Profile
@aaronkollasch
aaronkollasch / _op
Last active February 26, 2024 06:19
op completion for gh
#compdef _op op
function _op {
local curcontext="$curcontext" state state_descr line
typeset -A opt_args
local -a commands
_arguments -C \
'--account[Select the `account` to execute the command by account shorthand, sign-in address, account ID, or user ID. For a list of available accounts, run '\''op account list'\''. Can be set as the OP_ACCOUNT environment variable.]:' \
'--cache[Store and use cached information. Caching is enabled by default on UNIX-like systems. Caching is not available on Windows. Options: true, false. Can also be set with the OP_CACHE environment variable.]' \
@aaronkollasch
aaronkollasch / index.html
Created December 6, 2021 02:16
Test code for electron macOS cmd+shift+arrow detection
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
<link href="./styles.css" rel="stylesheet">
<title>Hello World!</title>
</head>
<body>
import Cocoa
import CoreAudio
import AudioToolbox
var str = "Compare bool and uint32 for kAudioDevicePropertyMute"
var propAddr = AudioObjectPropertyAddress(
mSelector: AudioObjectPropertySelector(kAudioHardwarePropertyDefaultOutputDevice),
mScope: AudioObjectPropertyScope(kAudioObjectPropertyScopeGlobal),
mElement: AudioObjectPropertyElement(kAudioObjectPropertyElementMaster))