This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[21:07] humitos: ~> python | |
Python 2.7.12 (default, Jul 18 2016, 15:02:52) | |
[GCC 4.8.4] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from __future__ import unicode_literals | |
>>> 'a' | |
u'a' | |
>>> # :) | |
... | |
>>> import md5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Reproduction of | |
;; https://stackoverflow.com/questions/45907854/browse-url-generic-program-as-a-safe-local-variable-values | |
(custom-set-variables | |
'(safe-local-variable-values | |
(quote | |
( | |
(browse-url-generic-program "firefox") | |
(browse-url-generic-program "google-chrome") | |
)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nov 11 20:21:10 julia kernel: Bluetooth: hci0 link tx timeout | |
nov 11 20:21:10 julia kernel: Bluetooth: hci0 killing stalled connection fc:a8:9a:b9:45:14 | |
nov 11 20:21:10 julia kernel: Bluetooth: hci0 link tx timeout | |
nov 11 20:21:10 julia kernel: Bluetooth: hci0 killing stalled connection fc:a8:9a:b9:45:14 | |
nov 11 20:21:12 julia bluetoothd[3336]: Disconnecting failed: already disconnected | |
nov 11 20:21:16 julia bluetoothd[3336]: Close: Connection timed out (110) | |
nov 11 20:21:16 julia kernel: Bluetooth: hci0 link tx timeout | |
nov 11 20:21:16 julia kernel: Bluetooth: hci0 killing stalled connection fc:a8:9a:b9:45:14 | |
nov 11 20:21:18 julia bluetoothd[3336]: Abort: Connection timed out (110) | |
nov 11 20:21:18 julia kernel: Bluetooth: hci0 link tx timeout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
from django.utils import timezone | |
from readthedocs.analytics.models import PageView | |
from readthedocsext.spamfighting.utils import spam_score | |
def is_active_project( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- running queries | |
SELECT pid, age(clock_timestamp(), query_start), usename, state, query | |
FROM pg_stat_activity | |
WHERE state != 'idle' AND query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- kill running query | |
SELECT pg_cancel_backend(procpid); | |
-- kill idle query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Download file from https://www.sports-tracker.com/ | |
// Example: https://www.sports-tracker.com/workout/jaumenarbona/61b508ae59ba772af9278c87 | |
// | |
// Based on: | |
// - https://ivanderevianko.com/2016/04/export-all-workouts-from-sports-tracker | |
// - https://gist.github.com/KonstantinosSykas/dfe4c5e392e299ab9341d6e16299454f | |
// | |
// | |
// Instructions: | |
// 1. Open the URL of the workaround you want to export |
OlderNewer