Skip to content

Instantly share code, notes, and snippets.

View tpaananen's full-sized avatar
🏠
Working from home

Tommi Paananen tpaananen

🏠
Working from home
View GitHub Profile
@tpaananen
tpaananen / 1_init.lua
Last active September 25, 2025 07:50
Hammerspoon script to set AirPods intial volume to desired level instead of default 50 %
-- Install hammerspoon for macos: https://github.com/Hammerspoon/hammerspoon
-- Save this file to ~/.hammerspoon/init.lua
-- Start hammerspoon
-- greds: https://www.reddit.com/r/MacOS/comments/16wkyvu/comment/n6tli2g
-- This retries to set the desired level if macbook / macos races with the initial set with their 50 % level
-- here is sample print out how it looks
-- 2025-09-24 20:12:52: Device changed: nil
@tpaananen
tpaananen / userChrome.css
Last active June 30, 2025 01:05
Firefox v140+ userChrome.css
/* userChrome.css */
/* about:config -> toolkit.legacyUserProfileCustomizations.stylesheets => true */
/* declare the XUL namespace so Firefox understands your selectors */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/*
Audio/mute icon on vertical tabs
==================
@tpaananen
tpaananen / Windows laptop boosting setup
Last active December 6, 2024 21:24
Windows 10/11 powerplan boosting adjustment:
Windows 10/11 powerplan boosting adjustment:
1) Open Registry "Win + R" and "regedit" command
2) Follow the path:
Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\be337238-0d82-4146-a960-4f3749d470c7
3) Change option under name "Attributes" from "1" to "0" or "2" (2 works for me)
4) Close all windows and reopen Power options!
Steps:
1) Open Advanced power option with "Win + R" and "powercfg.cpl" command
@tpaananen
tpaananen / unifi_unms_update.sh
Last active January 22, 2020 04:49
Unifi docker upgrade
# Unifi upgrade
sudo docker pull jacobalberty/unifi
sudo docker stop unifi
sudo docker rm unifi
sudo docker run -d --restart=unless-stopped --name=unifi -p 10.0.0.10:8080:8080 -p 10.0.0.10:8443:8443 -p 10.0.0.10:3478:3478/udp -p 10.0.0.10:10001:10001/udp -e TZ='Europe/Finland' -e RUNAS_UID0=false -e UNIFI_UID=1001 -e UNIFI_GID=1001 -v /unifi/docks/unifi:/unifi jacobalberty/unifi:latest
# UNMS manual update
curl -fsSL https://unms.com/v1/install > /tmp/unms_inst.sh && sudo bash /tmp/unms_inst.sh --update
# sudo docker image prune -a