Skip to content

Instantly share code, notes, and snippets.

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

SleepyJesse mgrddsj

🏠
Working from home
View GitHub Profile
@mgrddsj
mgrddsj / compressor.py
Created December 13, 2022 17:24
POC Auto Photo Compressor For Files With "[towebp]"
# This Python snippet watches for file changes in a specified directory.
# If a file contains "[towebp]", it runs ffmpeg and converts it to webp,
# then deletes the original file
# File watcher base code credits to:
# https://towardsdatascience.com/implementing-a-file-watcher-in-python-73f8356a425d
import os
import subprocess
import time
@mgrddsj
mgrddsj / userChrome.css
Created August 18, 2022 23:16
Firefox hide tabs bar and address bar
/* Hide tabs and title bar */
#TabsToolbar {
visibility: collapse;
}
#titlebar {
margin-bottom: -25px !important;
}
#titlebar-buttonbox {
  1. Add special mirroring modes for demonstration purposes.

  2. Assume rotation of HDMI display is portrait.

adb shell setprop persist.demo.hdmirotation portrait
  1. Don't lock rotation while HDMI is plugged in.
@mgrddsj
mgrddsj / BatteryTracker NullReferenceException Log
Created April 14, 2021 01:31
BatteryTracker NullReferenceException Log
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at BatteryTrackerFramework.TrayIcon.UpdateIcon()
at BatteryTrackerFramework.TrayIcon.<.ctor>b__12_1(Object o, EventArgs e)
at Microsoft.WindowsAPICodePack.ApplicationServices.MessageManager.PowerRegWindow.ExecuteEvents(ArrayList eventHandlerList)
at Microsoft.WindowsAPICodePack.ApplicationServices.MessageManager.PowerRegWindow.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)