Skip to content

Instantly share code, notes, and snippets.

@caseman72
caseman72 / fix-mouse.sh
Created April 16, 2026 03:49
fix mouse events after screensaver / login
#!/bin/bash
# fix-mouse: Fix stuck mouse events after wake from screensaver
#
# After waking from screensaver, macOS sometimes leaves a ghost "loginwindow"
# overlay (layer 2004) covering one display, silently eating all mouse events.
# This script finds and moves that overlay off-screen using the Accessibility API.
#
# Usage: fix-mouse
echo "Checking for stuck loginwindow overlays..."
@caseman72
caseman72 / A Lot of Work.md
Last active August 29, 2015 14:05
Mac OSX Mavericks - SABnzbd+, Plex Media Server, nginx, dnsmasq

First off ... just because you can do:

sudo launchctl load <file>

From the command line doesn't mean it will work on reboot:

sudo shutdown -r now
@caseman72
caseman72 / gist:7837472
Last active December 30, 2015 13:39
grunt watch - with update
module.exports = function(grunt) {
var fs = require("fs")
var path = require("path");
var xml_parser = require("xml2js");
var vision_path = "/var/www/vision";
var assets_xml = vision_path + "/website/etc/siteDefinition/assets.xml";
var assets_dest = vision_path + "/website/public/js/assets/";
var watch_files = [vision_path + "/website/public/js/**/*.js", "!" + assets_dest, assets_xml];