Skip to content

Instantly share code, notes, and snippets.

KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
@indiejoseph
indiejoseph / ffmpeg-mjpeg.sh
Created August 23, 2015 15:53
ffmpeg record mjpg-streamer
ffmpeg -f mjpeg -r 5 -i "http://openwrt:openwrt@localhost:8080/?action=stream" -r 5 ./video.avi
@adrianlzt
adrianlzt / stale_sensor.py
Created February 19, 2017 22:40
Home Assistant, App Daemon module to monitor for stale sensors
import appdaemon.appapi as appapi
import homeassistant.util.dt as dt_util
#
# Notify stale sensors.
# Each minute last update of sensor is checked to see if it is higher than the configured value
#
# Args:
# sensor = sensor to monitor
# tiempo = minutes threshold to notify
@colinodell
colinodell / patch-01-requirements.diff
Created May 22, 2017 02:48
Custom open-wave build for Home Assistant 0.45 on Docker
diff --git a/requirements_all.txt b/requirements_all.txt
index 6141e3d..2da4ce0 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -695,9 +695,6 @@ python-vlc==1.1.2
# homeassistant.components.wink
python-wink==1.2.4
-# homeassistant.components.zwave
-python_openzwave==0.4.0.31
@ciotlosm
ciotlosm / Readme.md
Last active February 5, 2024 15:04
Kiosk mode for lovelace

Kiosk mode

Installation

Add kiosk.js file with the content below to your www folder in config.

Like any other custom script, use ui-lovelace.yaml resources section to reference the kiosk.js file.

Make sure you add kiosk somewhere in your URL. You can use it in the id of your view or in the query string.

@AdamNaj
AdamNaj / about.md
Last active July 13, 2022 19:50
Z Wave Graph for Home Assistant
@mergwyn
mergwyn / zfsbench
Last active May 2, 2024 08:28
ZFS benchmarking using fio
#!/usr/bin/env bash
set -o errexit
echo $(date):Random read
fio --filename=test --sync=1 --rw=randread --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=10G --runtime=300 && rm test
echo $(date):Random write
fio --filename=test --sync=1 --rw=randwrite --bs=4k --numjobs=1 \
#! /usr/bin/perl
#
# Script to check for changes. It stores the original in a template file
# and (optionally) applies transformations on the output to compare with
# the updated content of a file or output from a command.
#
# Copyright 2016 <kjetil.homme@redpill-linpro.com>
# Released under the GPLv3 or later.
use strict;
@zaneclaes
zaneclaes / wifi-auto-connect.sh
Created October 30, 2019 20:55
Bash script to automatically connect to open WiFi networks, upon disconnect, via nmcli
#!/bin/bash
con="${1}"
if [[ -z "$con" ]]; then
echo "Please provide an interface name as an argument."
exit 1
fi
while true; do
conns=$(nmcli con show "$con" | grep "GENERAL.STATE:" | grep "activated")
@moyix
moyix / killbutmakeitlooklikeanaccident.sh
Created February 5, 2022 22:51
Script to inject an exit(0) syscall into a running process. NB: only x86_64 for now!
#!/bin/bash
gdb -p "$1" -batch -ex 'set {short}$rip = 0x050f' -ex 'set $rax=231' -ex 'set $rdi=0' -ex 'cont'