Skip to content

Instantly share code, notes, and snippets.

@lon9man
lon9man / gist:2532d5e476b1c1d737589b342da4604e
Created January 22, 2021 13:55 — forked from patrickgalbraith/gist:9538b85546b4e3841864
Javascript dynamic getter, setter using defineProperty
var User = (function () {
function User (id, nam) {
var self = this;
this.id = id;
this.nam = nam;
this.__data = {};
for(var p in self) {
@lon9man
lon9man / scrub_notifications.py
Created April 17, 2023 12:28 — forked from eacousineau/scrub_notifications.py
Scrub / Filter out Ubuntu 18.04 Desktop Notifications (via D-Bus)
"""
Runs a DBus message loop with a callback to receive... pretty much
anything on a session bus.
Listen to the Notify event; if it's a message we hate, record it, then
listen for the return message, and kill that message.
Tested On:
- Ubuntu 18.04.5 LTS, CPython 3.6.9 (dbus: 1.2.6, gi: 3.26.1)
To test, try running the following with and without this script running: