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 Twitter Media Source | |
| // @namespace https://gist.github.com/ara303 | |
| // @downloadURL https://gist.github.com/ara303/775c72887f3850d553a4bee84f1744e4 | |
| // @updateURL https://gist.github.com/ara303/775c72887f3850d553a4bee84f1744e4 | |
| // @version 2.1.10 | |
| // @description Allows copying direct full-size image/video links on Twitter (without a #tweetid source suffix), downloading media, and navigating back to a Tweet from a media URL. | |
| // @author AMM | |
| // @match https://twitter.com/* | |
| // @match https://x.com/* |
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
| The hostname came straight from the server itself. Every SMTP server announces its own name in its greeting banner — I just asked it. You don't need to guess or look it up anywhere. | |
| The two commands that did it | |
| 1. Ask the server on the SMTP port: | |
| printf 'EHLO test.local\r\n' | nc -G 6 mail.<domain_name>.co.uk 25 | |
| The reply was: | |
| 220-uk33.siteground.eu ESMTP #2 ... | |
| 250-uk33.siteground.eu Hello test.local ... | |
| That first line after 220- is the server's canonical name — uk33.siteground.eu. That's the name on its own valid certificate. Done. | |
| 2. Confirm that name has a valid cert (before trusting it): | |
| openssl s_client -connect uk33.siteground.eu:465 -servername uk33.siteground.eu </dev/null 2>&1 | grep "Verify return code" |
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 bash | |
| # ============================================================================= | |
| # Arch Linux + KDE Plasma — Automated Setup Script | |
| # ============================================================================= | |
| # Run as your normal user (NOT root). sudo will be invoked as needed. | |
| # Usage: bash arch-setup.sh | |
| # ============================================================================= | |
| set -euo pipefail |
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
| <?php | |
| /** | |
| * Plugin Name: Woo Subscriptions: Shared Access + Renewal Notices | |
| * Description: Extend WooCommerce Subscriptions so multiple users share one subscription’s benefits; includes admin UI to assign members and a renewal notice hook framework. | |
| * Author: GPT | |
| * Version: 1.0.0 | |
| * Requires at least: 6.0 | |
| * Requires PHP: 7.4 | |
| * License: GPLv2 or later | |
| * |
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
| <?php | |
| /** | |
| * Use Mailgun as WordPress's default SMTP sender instead of built-in mailer. | |
| * All of these should be set for the best chance of email delivery. | |
| * Create constant MAILGUN_PASSWORD in wp-config.php for secure storage of API secret. | |
| */ | |
| function use_mailgun_as_smtp( $phpmailer ) { | |
| $phpmailer->isSMTP(); | |
| $phpmailer->Host = 'smtp.eu.mailgun.org'; // Or not if you're using NA | |
| $phpmailer->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
| import json | |
| from difflib import get_close_matches | |
| import os | |
| os.system("color") | |
| class clrs: | |
| OKBLUE = '\033[94m' | |
| OKCYAN = '\033[96m' | |
| OKGREEN = '\033[92m' |
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
| function only_default_image_sizes(){ | |
| foreach( get_intermediate_image_sizes() as $size ){ | |
| if( ! in_array( $size, ['thumbnail', 'medium', 'medium_large', 'large'] ) ){ | |
| remove_image_size( $size ); | |
| } | |
| } | |
| } | |
| add_action( 'init', 'only_default_image_sizes' ); |
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
| <?php | |
| /** | |
| * Plugin Name: Table Import/Export | |
| * Description: For internal use only. To access, WP-Admin > Tools > Table Import/Export. | |
| */ | |
| function table_import_export_menu(){ | |
| add_submenu_page( | |
| 'tools.php', | |
| 'Table Import/Export', | |
| 'Table Import/Export', |
NewerOlder