Skip to content

Instantly share code, notes, and snippets.

View dangle's full-sized avatar

Melissa Nuño dangle

View GitHub Profile
@dangle
dangle / README.md
Created June 28, 2024 03:42
Instructions for automatically logging into the Unraid web GUI after authentication with Authentik

Secure the Unraid GUI behind Authentik

Assumptions

  1. You are using forward authentication behind a reverse proxy
  2. The internal host for Unraid does not use HTTPS
  3. The only user allowed for the Unraid web GUI is root
  4. The password for Unraid is stored as a user attribute
    1. The attribute can come from a group to which the user belongs
@dangle
dangle / Obsidian Todoist Script.md
Last active June 29, 2024 19:58
Script for use with Obsidian to pull in a snapshot of a day from Todoist

Obsidian Todoist Script

Description

This takes a day in YYYY-MM-DD format and can be called using the CustomJS plugin with either the Dataview plugin or the Templater plugin.

Styling

In order to get nicer styling, copy the todoist.css file to .obsidian/snippets and enable it under Settings → Appearance.

#!/usr/bin/env bash
IFS=$'\n'
eval $(xdotool getmouselocation --shell --prefix "MOUSE_")
for monitor in $(herbstclient list_monitors)
do
eval $(awk '{
print "ID=" $1
#!/usr/bin/env bash
herbstclient list_monitors | awk -F '[:+x\" ]' '/\[FOCUS\]/{
print "ID=" $1
print "WIDTH=" $3
print "HEIGHT=" $4
print "XOFFSET=" $5
print "YOFFSET=" $6
print "TAG=" $10
}'
@dangle
dangle / toggle-input.py
Last active February 14, 2021 20:33
A short script to switch between monitor inputs on evdev input swap
#!/usr/bin/python3
import platform
import subprocess
from pynput import keyboard
def toggle_input():
if platform.system() == 'Windows':
#include <curses.h>
#include <signal.h>
#define RED_RED 9
#define WHITE_BLACK 10
#define WHITE_WHITE 11
void done();
void rszf();
void drwc();
#!/usr/bin/env bash
# This script creates and activates a container when run as root.
# The file names used are from Ubuntu 18.04.
# Create the filesystem.
# It will only contain bash, ls, and the libraries to run them.
mkdir -p container-demo/{bin,lib,lib64,sys}
# Mount /sys into the filesystem to control cgroups.
mount --rbind /sys container-demo/sys

Keybase proof

I hereby claim:

  • I am dangle on github.
  • I am dangle (https://keybase.io/dangle) on keybase.
  • I have a public key ASBIzkGHkpG7Qlu4eQXJ7uMPnsp8fEDtw7I-eLWK3hal4wo

To claim this, I am signing this object: