This is what we did to setup a few dashboards at platanus
- Raspberry Pi
- Dashing Service
- Wifi stick (optional)
| <html><head><title>Find String</title></head><body> | |
| <?php | |
| // upload the file to the root and access the file via a browser. | |
| //It may take time to run so be patient as it will check all the files in the root and the directories in the root | |
| // Most hosting services will have a time limit on how long a php script can run, typically 30 seconds. | |
| // On large sites with a lot of files this script may not be able to find and check all files within the time limit. | |
| // If you get a time out error you can try over riding the default time limits by removing the // in the front of these two lines. |
| function add_custom_menu_item(){ | |
| add_menu_page( 'Menu Item Title', 'Page Title', 'manage_options', 'page_slug', 'function', 'dashicons-icon', 1 ); | |
| } | |
| add_action( 'admin_menu', 'add_custom_menu_item' ); | |
| function custom_menu_item_redirect() { | |
| $menu_redirect = isset($_GET['page']) ? $_GET['page'] : false; | |
| if($menu_redirect == 'page_slug' ) { |
| <?php | |
| /* | |
| Plugin Name: Disable REST API for anonymous users | |
| */ | |
| /** | |
| * Remove all endpoints except SAML / oEmbed for unauthenticated users | |
| */ | |
| add_filter( 'rest_authentication_errors', function($result) { | |
| if ( ! empty( $result ) ) { |
| <?php | |
| // (string) $message - message to be passed to Slack | |
| // (string) $room - room in which to write the message, too | |
| // (string) $icon - You can set up custom emoji icons to use with each message | |
| public static function slack($message, $room = "engineering", $icon = ":longbox:") { | |
| $room = ($room) ? $room : "engineering"; | |
| $data = "payload=" . json_encode(array( | |
| "channel" => "#{$room}", | |
| "text" => $message, |
This is what we did to setup a few dashboards at platanus