Skip to content

Instantly share code, notes, and snippets.

@dbohn
dbohn / gist:9319e1cfd90ddf5d56cbcbdb38a7be85
Last active January 30, 2026 15:15
IKEA HomeAssistant Matter.js log
This file has been truncated, but you can view the full file.
s6-rc: info: service matter-server successfully stopped
s6-rc: info: service banner: stopping
s6-rc: info: service banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service banner: starting
s6-rc: info: service fix-attrs successfully started
@dbohn
dbohn / show-terminal.sh
Last active May 29, 2020 13:48
Bind this to a keystroke in your WM on Linux (e.g. Gnome) and you can quickly jump into your terminal and back.
#!/bin/sh
pgrep alacritty > /dev/null
if [ $? -eq 0 ]; then
# Check if Alacritty is currently focused
xprop -id $(xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) WM_CLASS | grep Alacritty > /dev/null
if [ $? -eq 0 ]; then
@dbohn
dbohn / hc-sr04.ino
Created May 2, 2016 16:56
HC-SR04 Arduino Sketch
#define TRIGGER 13
#define ECHO 12
long duration, cm;
void setup() {
pinMode(TRIGGER, OUTPUT);
pinMode(ECHO, INPUT);
Serial.begin(9600);
@dbohn
dbohn / CommanderTrait.php
Created September 7, 2014 21:00
Automatic value object injection in Laracast Commander Command
<?php
use ReflectionClass;
use InvalidArgumentException;
use Input, App;
use ReflectionParameter;
/**
* Proudly based on laracasts/Commander!
*/