Skip to content

Instantly share code, notes, and snippets.

View pschmitt's full-sized avatar
🧠
spaces > tabs

Philipp Schmitt pschmitt

🧠
spaces > tabs
View GitHub Profile
{
"name": "netbird-dashboard",
"version": "2.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "netbird-dashboard",
"version": "2.0.0",
"dependencies": {
@pschmitt
pschmitt / error.log
Last active May 1, 2024 06:49
M/Monit Egress Certificate Check
2024-05-01 08:32:23 License exception: Could not create a trial license by connecting to https://mmonit.com/ -- SSL connect error [88.99.240.67] error:0A000086:SSL routines::certificate verify failed
# If you cannot connect to https://mmonit.com/ from this machine, use this
command to obtain a trial license from a machine connected to the internet:
curl -X POST https://mmonit.com/api/services/license/trial -o license.xml
Copy license.xml to mmonit's conf/ directory on this machine and start mmonit
Note: This url is throttled and will fail with (429) if more requests
@pschmitt
pschmitt / xdg-portal-screencast-watcher.sh
Created February 23, 2024 07:23
XDG Desktop Portal DBUS monitoring tool to react to ScreenCast start/stop events
#!/usr/bin/env bash
# Monitor D-Bus for XDG Portals screencasting events
# Requires: busctl and jq
echo_debug() {
if [[ -z "$DEBUG" ]]
then
return 0
fi
@pschmitt
pschmitt / binds.conf
Last active February 17, 2024 10:00
hyprland input config
# https://wiki.hyprland.org/Configuring/Binds/
$mod = SUPER
# hyprland binds
bind = $mod SHIFT, C, exec, $bin_dir/kill-active.sh
bind = $mod SHIFT, K, exec, hyprctl kill
bind = $mod SHIFT, Q, exec, $bin_dir/leave.sh
bind = $mod SHIFT, R, exec, $bin_dir/reload-config.sh
bind = $mod ALT, R, forcerendererreload,
@pschmitt
pschmitt / hyprland.log
Created February 10, 2024 15:30
hyprland 0.35 xkb_layout issue
Feb 10 16:07:48 ge2 hyprland[2382428]: Welcome to Hyprland!
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Instance Signature: 84ab8d11e8951a6551d1e1bf87796a8589da6d47_1707577668
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Hyprland PID: 2382428
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] ===== SYSTEM INFO: =====
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] System name: Linux
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Node name: ge2
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Release: 6.7.4
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Version: #1-NixOS SMP PREEMPT_DYNAMIC Mon Feb 5 20:17:12 UTC 2024
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] GPU information:
Feb 10 16:07:48 ge2 hyprland[2382428]: 00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04) (prog-if 00 [VGA controller])
@pschmitt
pschmitt / json-input.patch
Created February 19, 2023 21:04
home-assistant-cli read JSON from stdin patch
diff --git a/homeassistant_cli/plugins/raw.py b/homeassistant_cli/plugins/raw.py
index 46c544e..62e6a1a 100644
--- a/homeassistant_cli/plugins/raw.py
+++ b/homeassistant_cli/plugins/raw.py
@@ -61,7 +61,9 @@ def get(ctx: Configuration, method):
def post(ctx: Configuration, method, json):
"""Do a POST request against api/<method>."""
if json:
- data = json_.loads(json)
+ data = json_.loads(
@pschmitt
pschmitt / pulseaudio.zsh
Created April 13, 2022 15:01
Overengineered pulseaudio cli wrapper
# Generic PulseAudio wrapper commands
if (( ! $+commands[pactl] ))
then
return
fi
pulseaudio::list() {
local invert
local friendly_name
local monitor
@pschmitt
pschmitt / sway-maximize.sh
Last active March 26, 2024 01:01
sway ipc script to maximize the currently focused window
#!/usr/bin/env bash
usage() {
echo "Usage: $(basename "$0") [-d DEFAULT_BORDER_PX] [-m MAXIMIZED_BORDER_PX]"
}
get_waybar_height() {
# Waybar's config is JSONC, ie it contains comments. We need to strip
# these for jq.
grep -v '//' ~/.config/waybar/config | jq -er '.height'
@pschmitt
pschmitt / zinit-logo-2.svg
Last active November 6, 2021 14:19
zinit svg logo without color
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pschmitt
pschmitt / wifi-scan.zsh
Created January 4, 2021 20:56
wifi-scan.zsh
wifi-scan() {
setopt localoptions pipefail errreturn
local device="$(wifnames | tail -1)"
local raw
zparseopts -D -K -E \
r=raw -raw=raw
if [[ -z "$device" ]]