Skip to content

Instantly share code, notes, and snippets.

@alrnz
alrnz / .htaccess
Created September 21, 2016 16:16 — forked from brichards/.htaccess
Tell Apache to serve missing images from a remote server. Props http://stackoverflow.com/questions/5130410/modrewrite-to-another-server-if-file-image-is-not-found
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^(.*\.(js|css|png|jpe?g|gif|ico)) http://example.com/$1 [NC,L]
</IfModule>
@alrnz
alrnz / auto_core_update_email.php
Last active January 12, 2017 09:53 — forked from annalinneajohansson/auto_core_update_email.php
Change the recipient email for auto_core_update_email
<?php
// change email of auto update notification
function filter_change_auto_update_email( $email ) {
$email['to'] = 'username@example.com';
return $email;
}
add_filter( 'auto_core_update_email', 'filter_change_auto_update_email', 1 );
@alrnz
alrnz / mysqldump.php
Created September 11, 2018 21:44 — forked from micc83/mysqldump.php
Simple PHP script to dump a MySql database
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$database = 'db';
$user = 'user';
$pass = 'pass';
$host = 'localhost';