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
#!/bin/bash | |
# Database credentials | |
user="USERNAME" | |
password="PASSWORD" | |
host="HOST" | |
db_name="DATABASE" | |
# General config | |
backup_path="/WHERE/TO/PUT/BACKUP/FILE" |
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
#!/bin/bash | |
# Location of log file is passed in as the first parameter | |
# Get a list of all the dates in the file | |
DATES="$(grep "2016" $1 | cut -d ' ' -f 1 | sort | uniq)" | |
for i in ${DATES}; do | |
# $i contains the string of the date we are looking at | |
# Remove the leading [ to prevent grep regex errors |
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
#!/usr/bin/perl | |
use DBI; | |
use 5.010; | |
use Getopt::Long; | |
# Set defaults | |
my $host = 'localhost'; | |
my $db = 'information_schema'; | |
my $user = ''; |
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
add_filter( 'site_transient_update_plugins', 'wds_wp_seo_no_update' ); | |
function wds_wp_seo_no_update( $value ) { | |
if ( empty( $value ) || empty( $value->response['wordpress-seo/wp-seo.php'] ) ) { | |
return $value; | |
} | |
unset( $value->response['wordpress-seo/wp-seo.php'] ); | |
return $value; | |
} |
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
<?php | |
add_filter('wpmu_signup_user_notification', 'auto_activate_users', 10, 4); | |
function auto_activate_users($user, $user_email, $key, $meta){ | |
wpmu_activate_signup($key); | |
return false; | |
} |
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
<?php | |
/* | |
* Disable emojis. | |
* | |
* There have been security issues, plus it simply provides better | |
* performance not to load unecessary core crap all the time. | |
*/ | |
function grd_remove_emoji() { | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); |
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
<?php | |
WDS_VC_CTA::get_instance(); | |
class WDS_VC_CTA { | |
private static $instance = null; | |
private $block_name = 'wds_cta'; | |
private function __construct() { |
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
if ( ! function_exists( 'unregister_post_type' ) ) : | |
function unregister_post_type( $post_type ) { | |
global $wp_post_types; | |
if ( isset( $wp_post_types[ $post_type ] ) ) { | |
unset( $wp_post_types[ $post_type ] ); | |
return true; | |
} | |
return false; | |
} | |
endif; |