This file contains hidden or 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
| // ==UserScript== | |
| // @name "mark all as read" button for old.reddit.com | |
| // @description Adds a "mark all as read" button to https://old.reddit.com/message/unread/ | |
| // @match https://old.reddit.com/message/unread/* | |
| // @author relthyg | |
| // ==/UserScript== | |
| (function() { | |
| function getModhash() { | |
| // Prefer the global reddit object, fall back to the hidden input | |
| return (typeof reddit !== 'undefined' && reddit.modhash) |
This file contains hidden or 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
| # mail.py | |
| # simple Python script for testing smtp connections | |
| # see https://realpython.com/python-send-email/#sending-a-plain-text-email | |
| import smtplib, ssl | |
| smtp_server = "<your-smtp-hostname>" | |
| smtp_username = "<your-smtp-username>" | |
| sender_email = "<sender-email-address>" | |
| receiver_email = "<receiver-email-address>" | |
| port = 587 |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # | |
| # mysql-dsn | |
| # Takes a DSN as argument and tries to connect to the specified database using the "mysql"-command. | |
| # Passwords must be quoted ("url-encoded"). | |
| # | |
| # Example: | |
| # $ mysql-dsn mysqli://me:top_secret@hostname:33006/db-name | |
| import re |