Skip to content

Instantly share code, notes, and snippets.

@denalena
denalena / call.sh
Created July 24, 2024 12:19
some sketches for a SIP doorbell prototype
#!/usr/bin/expect -f
# Set the SIP account details
set sip_account "cuteUsername"
set sip_password "superSecretPassword"
set sip_domain "fritz.box"
set destination "sip:**9@fritz.box"
# **9 is a call group for every phone in my fritzbox
# not sure if this is a common thing
javascript:(function(){%22use%20strict%22%3B%2F%2Fbookmarklet-title%3A%20Don't%20Mess%20With%20Paste%0A%2F%2Fbookmarklet-about%3A%20For%20when%20signup%20forms%20expect%20you%20to%20hand-type%20your%20email%20address%20twice.%0A%5B%22contextmenu%22%2C%22copy%22%2C%22paste%22%2C%22selectstart%22%5D.map(function(e)%7Breturn%20document.addEventListener(e%2Cfunction(e)%7Breturn%20e.stopPropagation()%7D%2Ctrue)%7D)%3B})();
@denalena
denalena / loop.sh
Last active April 19, 2024 09:33
a utility script to loop commands that run indefinitely - as a `watch` alternative
#!/bin/bash
test -z "$1" && exit 1
while true; do
"$@"
sleep 1
done
@denalena
denalena / .xsessionrc
Created April 4, 2023 15:14
Logitech MX Ergo: Mapping Scrolling to pointer while holding "Back" button
xinput set-prop "pointer:Logitech MX Ergo" "libinput Button Scrolling Button" 8
xinput set-prop "pointer:Logitech MX Ergo" "libinput Scroll Method Enabled" 0 0 1
@denalena
denalena / set_ergo_scroll.py
Created April 4, 2023 14:57 — forked from pedrovhb/set_ergo_scroll.py
This makes it so that as long as that button is being held, moving the cursors scrolls instead.
#! /usr/bin/env python
import re
import subprocess
RE_LOGITECH_ID = rb"Logitech MX Ergo[\s\-\w]+id=(\d+).*pointer"
def set_ergo_scroll() -> None:
@denalena
denalena / noise.sh
Created November 21, 2022 13:32
Ambient brown noise generator
#!/bin/bash
play -n -n --combine merge synth brownnoise band -n 550 550 tremolo 50 1 vol -17dB reverb bass 10 treble -6
@denalena
denalena / logtest.sh
Created April 28, 2022 08:45
A quick example of how to wrap logging around an existing bash script
#!/bin/bash
set -eux
LOGFILE=./$(date +%F)-$1.log
{
date
false
date
@denalena
denalena / android-godot.md
Last active September 2, 2021 18:00
Godot Android Deploy & Run
./Android/Sdk/platform-tools/adb install -r Multitouch\ Cubes\ Demo\ .apk 
./Android/Sdk/platform-tools/adb shell am start -n org.godotengine.multitouchcubesdemo/com.godot.game.GodotApp
@denalena
denalena / README.md
Last active August 4, 2021 12:04
HOWTO Windows 10 PDF Stapelverarbeitung

HOWTO Windows 10 PDF Stapelverarbeitung

Schritt 1: Installation von ImageMagick & GhostScript

Schritt 2: Ordner

  • Alle zu konvertierenden Dateien in einen Ordner KOPIEREN (zB "C:\convert\input")
  • Einen zweiten Ordner für die neuen Dateien erstellen (zB "C:\convert\output")
  • Beide vollen Pfade zu den Ordnern griffbereit haben, zB mit notepad.exe