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 | |
/** | |
* @author: Pavel Petrov | |
* Pagespeed Insights API wrapper for PHP | |
* Article: https://codingstories.net/what-is-google-pagespeed-and-why-does-it-matter | |
*/ | |
class PagespeedChecker { | |
private $apiKey = false; | |
private $url = ''; | |
private $pagespeed; |
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: Boilerplate | |
* Plugin URI: http://webbamboo.net | |
* Description: Boilerplate for WP plugin | |
* Version: 0.1 | |
* Author: Webbamboo Ltd | |
* Author URI: http://webbamboo.net | |
* License: GPL2. | |
**/ |
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 | |
namespace App\Mapping; | |
use Doctrine\ORM\Mapping as ORM; | |
use DateTime; | |
/** | |
* Class EntityBase | |
* |
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 isSerialized($data) | |
{ | |
set_error_handler(function($errno, $errstr){ | |
if($errno == E_WARNING) { | |
throw new \Exception($errstr); | |
} else if($errno == E_NOTICE) { | |
throw new \Exception($errstr); | |
} |
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
for (var key in p) { | |
if (p.hasOwnProperty(key)) { | |
console.log(key + " -> " + p[key]); | |
} | |
} |