Skip to content

Instantly share code, notes, and snippets.

@acruise
acruise / zoom status.1s.scpt
Created June 30, 2022 21:50
SwiftBar script to put zoom mic/camera status in the menu bar
#!/usr/bin/osascript
# <bitbar.title>Mute/Video/Screen State for Zoom</bitbar.title>
# <bitbar.version>v1.0</bitbar.version>
# <bitbar.author>nickjvturner</bitbar.author>
# <bitbar.author.github>nickjvturner</bitbar.author.github>
# <bitbar.desc>Mute/Video/Screen State for Zoom</bitbar.desc>
# <bitbar.dependencies>Applescript</bitbar.dependencies>
# <swiftbar.hideAbout>true</swiftbar.hideAbout>
@acruise
acruise / .XCompose
Created March 30, 2015 17:27
My .XCompose file
include "/usr/share/X11/locale/en_US.UTF-8/Compose"
## ^^ go look in that file for compose sequences, this only contains my additions
## Note that this isn't very useful unless you have actually mapped a keyboard key to Multi_key.
## In my case I use a KDE setting for that
<Multi_key> <less> <equal> : "⇐" U21D0 # LEFTWARDS DOUBLE ARROW
<Multi_key> <equal> <greater> : "⇒" U21D2 # RIGHTWARDS DOUBLE ARROW
<Multi_key> <apostrophe> <p> : "′" U2032 # Prime
@acruise
acruise / bluey.sh
Created March 19, 2015 21:54
How do you make a Bluetooth headset work in Linux?
#!/bin/bash
mac=00:1A:7D:D0:27:B1
macu=$(echo $mac |tr ":" "_")
dbus-send --system --print-reply=literal --dest="org.bluez" "/org/bluez/hci0/dev_$macu" org.bluez.Device1.Connect
pactl set-card-profile bluez_card.$macu a2dp_sink
--- /usr/bin/rrd2whisper 2013-09-02 14:26:29.000000000 -0700
+++ /home/alex/bin/rrd2whisper.py 2014-03-21 15:17:15.757422147 -0700
@@ -38,6 +38,11 @@
', '.join(aggregationMethods),
default='average',
type='string')
+option_parser.add_option(
+ '--now',
+ help="The time to use as \"now\"",
+ default=None,

Keybase proof

I hereby claim:

  • I am acruise on github.
  • I am acruise (https://keybase.io/acruise) on keybase.
  • I have a public key whose fingerprint is 5AE8 314E 0420 A789 AEBE 4138 2B1B 684D BB7F DD5A

To claim this, I am signing this object:

/**
* Splits the in collection into three collections, based on whether each element is assignable to X, Y or Z (in that order).
*/
def filterByType3[X <: AnyRef : Manifest, Y <: AnyRef : Manifest, Z <: AnyRef : Manifest](in: Traversable[_]): (Seq[X], Seq[Y], Seq[Z]) = {
val clax = manifest[X].runtimeClass
val clay = manifest[Y].runtimeClass
val claz = manifest[Z].runtimeClass
def _filterByType3(in: Seq[_], xs: Vector[X], ys: Vector[Y], zs: Vector[Z]): (Seq[X], Seq[Y], Seq[Z]) = {
in match {