Skip to content

Instantly share code, notes, and snippets.

🌴
WatchingPaintDry

Dece

View GitHub Profile
@Dece
Dece / spoupsify.py
Last active Apr 6, 2019
Spoupsify - Mute Spotify ads automatically
View spoupsify.py
#!/usr/bin/env python3
#
# Spoupsify - Mute Spotify ads automatically
# WTFPL - github @dece - twitter @postdroned
#
# Run this script to automatically mute the Linux Spotify desktop application
# when it plays an audio ad. If your Spotify is not in English, you will need to
# add to the TITLES_TO_MUTE list the Spotify window title shown during ads.
#
# Please note that this script needs the Spotify window to be kept open or
@Dece
Dece / gallery-gen.go
Last active Jun 15, 2018
EmlGallery - Elementary Masonry & Lightbox Gallery - Generate JSON metadata with gallery-gen.go, serve gallery.html with your files for friends & family.
View gallery-gen.go
@Dece
Dece / firefox-update.sh
Last active Jun 12, 2018
FirefoxUpdate - Update a Firefox version from shell, e.g. newest Firefox stable on Debian stable (which is otherwise stuck with ESR).
View firefox-update.sh
#!/bin/bash
# Update a Firefox version from shell.
# Useful for Debian stable and its ESR shenanigans.
# Can break due to a lot of things but w/e get off my lawn.
FFX_DIR="/opt/firefox"
INSTALL_DIR="$(dirname $FFX_DIR)"
# You can add a 'lang' query param to URL if you want (e.g. 'fr', 'it', ...)
BASE_URL="https://download.mozilla.org/"
@Dece
Dece / ob-lobat.py
Created May 21, 2017
ObLobat - Send a DBus notification on low battery
View ob-lobat.py
#!/usr/bin/env python3
""" Send a DBus notification on low battery.
Install Dependencies:
$ sudo apt-get install libdbus-glib-1-dev
$ sudo pip3 install batinfo python-daemon dbus-python notify2
"""
import subprocess
import sys
@Dece
Dece / ob-exit.py
Created May 21, 2017
ObExit - Adaptation of the original cb-exit script found in the Crunchbang distribution to work with SystemD
View ob-exit.py
#!/usr/bin/env python
""" Adaptation of the original cb-exit script found in the Crunchbang
distribution to work with SystemD.
I replaced "cb" with "ob" to match the Openbox tool names (obconf, obmenu)
because that script fits well with the Openbox WM.
"""
import os
@Dece
Dece / np.py
Last active May 21, 2017
NectarinePlaying - Output on stdout the current track song and artist on Nectarine
View np.py
#!/usr/bin/env python3
""" Output on stdout the current track song and artist on Nectarine.
It's mainly useful if you work with terminals around and don't want to keep the
Nectarine tab under your eyes all the time (even if it's raina's design). Due to
its nature it can be used with conky, but as it requests the nectarine page at
each execution, it would be better if you use it with the ${execi} command and a
big interval (10 or 20 seconds). Respect their servers, and long live Nectarine!
"""
You can’t perform that action at this time.