Skip to content

Instantly share code, notes, and snippets.

@vkartk
vkartk / wordpress-reply-to.php
Created April 25, 2024 15:23
Wordpress Custom Reply-To Email
// Sets reply-to if it doesn't exist already.
add_filter( 'wp_mail', 'wp_mail_filter_set_reply_to' );
function wp_mail_filter_set_reply_to( $args ) {
if (!isset($args['headers'])) {
$args['headers'] = array();
}
$headers_ser = serialize($args['headers']);
@vkartk
vkartk / Caddyfile
Created May 31, 2024 05:35
Caddy Default Config File
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
@vkartk
vkartk / .htaccess
Created September 6, 2024 12:00
Cloudways WordPress htaccess File
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
@vkartk
vkartk / wg0.conf
Created October 21, 2024 15:53
Sample WireGuard configuration
[Interface]
PrivateKey = YOUR_PRIVATE_KEY
Address = 10.0.0.2/24
DNS = 1.1.1.1, 1.0.0.1
[Peer]
PublicKey = YOUR_SERVER_PUBLIC_KEY
AllowedIPs = 0.0.0.0/0
Endpoint = YOUR_SERVER_WAN_IP:51820