Skip to content

Instantly share code, notes, and snippets.

View tribulant's full-sized avatar

Tribulant tribulant

View GitHub Profile
@tribulant
tribulant / gist:3acf08542963a4022b20cd215bb07522
Created March 20, 2017 10:31
Optimize and Repair a Single Table in Database
mysqlcheck -u root -p --auto-repair --optimize mydatabase mytable
@tribulant
tribulant / gist:00759f5155ef9676f36295efb497304a
Created March 20, 2017 10:30
Optimize and Repair a Single Database
mysqlcheck -u root -p --auto-repair --optimize --databases mydatabase
@tribulant
tribulant / gist:caadd33029765f676f349afbf35029b1
Created March 20, 2017 10:28
Optimize and Repair All Databases on Server
mysqlcheck -u root -p --auto-repair --optimize --all-databases
@tribulant
tribulant / gist:1d8a82c8f0be58632226141a37ac6953
Created March 17, 2017 10:27
Large, Centered Post Thumbnail
[newsletters_post_thumbnail size="large" align="none" hspace="0"]
@tribulant
tribulant / gist:18ce1daf96645701164c95f6fab57835
Created March 17, 2017 10:27
Left Aligned Thumbnail with Spacing
[newsletters_post_thumbnail size="thumbnail" align="left" hspace="15"]
@tribulant
tribulant / gist:32290d63504bc7a2aac04e41b97948c7
Created March 17, 2017 10:05
Newsletters Post Featured Image
[newsletters_post_thumbnail...]
@tribulant
tribulant / gist:47b82abd40bed51509dd4163633a4fac
Created March 17, 2017 10:04
Post Thumbnail Image of Specific Post
[newsletters_post_thumbnail post_id="123"...]
@tribulant
tribulant / functions.php
Last active January 9, 2023 20:50
WordPress upload_mimes filter hook example
// Add this to the functions.php file of your WordPress theme
// It filters the mime types using the upload_mimes filter hook
// Add as many keys/values to the $mimes Array as needed
function my_custom_upload_mimes($mimes = array()) {
// Add a key and value for the CSV file type
$mimes['csv'] = "text/csv";
return $mimes;
@tribulant
tribulant / wp-config.php
Created January 20, 2017 11:02
WordPress Allow Unfiltered Uploads for wp-config.php
define('ALLOW_UNFILTERED_UPLOADS', true);
@tribulant
tribulant / subscriberscount.php
Created December 7, 2016 10:48
Subscribers per Mailing List
<?php
global $SubscribersList;
$list_id = 3; // replace this with the ID of the mailing list
$count = $SubscribersList -> count(array('list_id' => $list_id));
echo 'There are ' . $count . ' subscribers in this mailing list.';
?>