Skip to content

Instantly share code, notes, and snippets.

View humitos's full-sized avatar
💭
Drinking 🧉. Always.

Manuel Kaufmann humitos

💭
Drinking 🧉. Always.
View GitHub Profile
# python 2.7.12
# it shows more differences than it should, since shows all the 'u' from
# Unicode keys from the dictionaries
# my main problem with this is when we do not control the data (for example
# when it's generated in another file that does not use `unicode_literals` from
# `__future__` since we have no control over that
@humitos
humitos / spotify-noads.py
Last active February 21, 2021 03:12
Remove Ads from Spotify Linux client by mutting the audio system
# -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# -*- coding: utf-8 -*-
# AWFUL synchronic version of NoSpotifyAds: the main idea is to detect silent
# into the stream and chunk it between of those silent. Then, if the chunk is
# between 25 and 35 seconds, instead of playing the ads we play a silent.
# OBVIOUS: it doesn't work! :)
# WHY?: it needs to be asynchronic. While we are playing, we need to detect
# silent and prepare the next chunk to be played.
;; Solución ELISP a http://elblogdehumitos.com.ar/posts/wordpress/no-mas-mate-frio/
(global-set-key (kbd "C-c m") 'mate-start-stop)
(defun mate-start-stop ()
"Start or stop the current timer"
(interactive)
(if (eq mate-say-cancel-id nil)
(progn
(mate-say-start)