Skip to content

Instantly share code, notes, and snippets.

View Erudition's full-sized avatar

Erudition Erudition

  • Inventive Consulting
View GitHub Profile
@Erudition
Erudition / StopAwayStatus.ps1
Last active December 2, 2026 18:32
Teams stay-active helper: business hours, US federal holidays, idle-aware NUMLOCK keep-awake (PowerShell, Windows 11)
# --- Configuration ---
$StartHour = 9 # Business hours start (24h clock)
$EndHour = 17 # Business hours end (24h clock)
$WorkDays = @(1,2,3,4,5) # Mon-Fri (0=Sun, 6=Sat)
$IdleThresholdSeconds = 240 # Only press keys after 4 min with no input (Teams goes Away at ~5 min)
$ActiveCheckSeconds = 30 # Recheck cadence while you are active
$IdleLoopSeconds = 60 # Press cadence while idle
$AwayLoopSeconds = 300 # Recheck cadence outside business hours
$ExtraHolidays = @() # Extra non-working dates, yyyy-MM-dd (e.g. company floating days)
$TeamsCheckMinSeconds = 15 # Initial recheck cadence when Teams is not running
@Erudition
Erudition / zen-sidebery.js
Created April 16, 2025 05:33
Sidebery replacement for Zen Browser Tabs
// Fetch first extension matching the name if any
let sidebery_policy = WebExtensionPolicy.getActiveExtensions().filter((ext) => ext.name == "Sidebery")[0]
let sidebery_browser;
let init_sidebery_browser;
if (sidebery_policy) {
let sidebery_extension = sidebery_policy.extension;
let sidebery_uri = sidebery_extension.manifest.sidebar_action.default_panel;