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 | |
/* | |
Plugin Name: Remove Update Nag | |
Description: Remove WordPress update nag as not needed | |
*/ | |
add_action('after_setup_theme','remove_core_updates'); | |
function remove_core_updates() | |
{ | |
if(! current_user_can('update_core')){return;} |
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 | |
/* | |
Plugin Name: Category Icons | |
Plugin URI: http://www.category-icons.com/ | |
Description: Easily assign icons to your categories. (Minimum WP version : 2.8) | |
Version: 2.2.3 | |
Author: Brahim Machkouri | |
Author URI: http://www.category-icons.com/ | |
Text Domain: category_icons | |
Domain Path: /languages/ |
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 | |
/* | |
Plugin Name: WordPress TimeStack | |
Description: WordPress Profiling | |
Author: Human Made Limited | |
Version: 0.9 | |
*/ | |
class HM_Time_Stack { |
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 /* start WPide restore code */ | |
if ($_POST["restorewpnonce"] === "d859796ed783fd60ae9fc9db3a5e32a585e948a587"){ | |
if ( file_put_contents ( "/var/www/sites/sites.co.uk/sites.co.uk/subdomains/site/html/wp-content/themes/mm/customer-comments.php" , preg_replace("#<\?php /\* start WPide(.*)end WPide restore code \*/ \?>#s", "", file_get_contents("/var/www/sites/sites.co.uk/sites.co.uk/subdomains/site/html/wp-content/plugins/wpide/backups/themes/handyman-mm/customer-comments_2013-04-11-23.php") ) ) ){ | |
echo "Your file has been restored, overwritting the recently edited file! \n\n The active editor still contains the broken or unwanted code. If you no longer need that content then close the tab and start fresh with the restored file."; | |
} | |
}else{ | |
echo "-1"; | |
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 | |
//hook into the 'shutdown' action and debug some filters... but not on the admin this time | |
if (! is_admin() ) | |
add_action('shutdown', 'use_debug_filters',10); | |
function use_debug_filters(){ | |
echo "<h3>Output hooks and filters that contain the string 'init'</h3>"; | |
debug_filter("/init/i"); |
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
curl -XGET 'http://192.168.11.3:9200/logstash-2013.07.29/_mapping?pretty=true' | |
{ | |
"logstash-2013.07.29" : { | |
"syslog" : { | |
"_all" : { | |
"enabled" : false | |
}, | |
"properties" : { | |
"@fields" : { |
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 | |
function my_additional_schedules($schedules) { | |
// interval in seconds | |
$schedules['every2min'] = array('interval' => 2*60, 'display' => 'Every two minutes'); | |
return $schedules; | |
} | |
add_filter('cron_schedules', 'my_additional_schedules'); | |
// schedule the wp_cron_testing |
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 | |
/* | |
The code below hides the admin menu items for all users that don't have the 'manage_sites' capability. | |
On multisite that would mean only Super Admins can look at those menu items | |
This script only removes the menu items so users can still look at the page if they know the path, but it de-clutters the admin | |
*/ | |
global $current_user; | |
if ( !current_user_can('manage_sites') ) { |
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/sh | |
i="shape-detect.cpp" | |
echo "compiling $i" | |
g++ -ggdb `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv`; |
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
{ | |
"template_logstash":{ | |
"template" : "logstash*", | |
"settings" : { | |
"number_of_shards" : 5, | |
"index.cache.field.type" : "soft", | |
"index.refresh_interval" : "5s", | |
"index.store.compress.stored" : true, | |
"index.query.default_field" : "message", | |
"index.routing.allocation.total_shards_per_node" : 5 |