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 refresh=(seconds) to query string. | |
# Eg. refresh=5 | |
RewriteEngine on | |
RewriteCond %{QUERY_STRING} (^|&)refresh=([0-9]{1,5})(&|$) | |
RewriteRule ^ - [E=REFRESH_SECONDS:%2] | |
Header set Refresh %{REFRESH_SECONDS}e env=REFRESH_SECONDS |
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 "%{QUERY_STRING} =~ /(prettyprint|pretty|displaycode)/"> | |
Header set Content-Type text/plain | |
</If> |
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
class TokenNotifier | |
{ | |
private $callables; | |
public function __construct() | |
{ | |
$this->callables = new SplQueue(); | |
$this->callables->setIteratorMode(SplDoublyLinkedList::IT_MODE_KEEP); | |
} | |
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
$searchForDeclaration | |
= new WordBoundaryAround( | |
new OptionalSpacesAround( | |
new Group( | |
new Alteration(['use', ','])))); | |
$matchNamedSpace | |
= new Optional( | |
new NamedGroup( | |
'namespace', |
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
class NamespaceSeparator | |
{ | |
public function __toString() | |
{ | |
return '\x5c'; | |
} | |
} | |
class NamedGroup | |
{ |
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 | |
# To get: | |
# rm -rf WP-CLI-Install && wget -O WP-CLI-Install https://gist.githubusercontent.com/saxenap/0be7986bf9a103252479/raw && chmod 777 WP-CLI-Install && ./WP-CLI-Install | |
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar | |
chmod 755 wp-cli.phar | |
sudo mv wp-cli.phar /usr/local/bin/wp | |
sudo ln -s /usr/local/bin/wp /usr/bin/wp | |
echo " Installed: WP-CLI." |
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 | |
# To get: | |
# rm -rf mod_pagespeed-install && wget -O mod_pagespeed-install https://gist.githubusercontent.com/saxenap/8799c2c7211d9cf9815f/raw && chmod 777 mod_pagespeed-install && ./mod_pagespeed-install | |
wget https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_x86_64.rpm | |
sudo yum install at | |
sudo rpm -U mod-pagespeed-*.rpm | |
sudo service httpd restart | |
echo " Installed: PageSpeed module (mod_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
{"DataType":{"extends":"","properties":[]},"Boolean":{"extends":"DataType","properties":[]},"False":{"extends":"Boolean","properties":[]},"True":{"extends":"Boolean","properties":[]},"Date":{"extends":"DataType","properties":[]},"DateTime":{"extends":"DataType","properties":[]},"Number":{"extends":"DataType","properties":[]},"Float":{"extends":"Number","properties":[]},"Integer":{"extends":"Number","properties":[]},"Text":{"extends":"DataType","properties":[]},"URL":{"extends":"Text","properties":[]},"Time":{"extends":"DataType","properties":[]},"Thing":{"extends":"","properties":{"additionalType":{"expectedTypes":["URL"]},"alternateName":{"expectedTypes":["Text"]},"description":{"expectedTypes":["Text"]},"image":{"expectedTypes":["URL","ImageObject"]},"name":{"expectedTypes":["Text"]},"potentialAction":{"expectedTypes":["Action"]},"sameAs":{"expectedTypes":["URL"]},"url":{"expectedTypes":["URL"]}}},"Action":{"extends":"Thing","properties":{"actionStatus":{"expectedTypes":["ActionStatusType"]},"agent":{"expec |
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 | |
class Types | |
{ | |
/** | |
* An array with all available Types and information | |
* | |
* @var array | |
*/ | |
protected $types = array( | |
'DataType' => array( |
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 "%{QUERY_STRING} =~ /(debug|dev)/"> | |
php_value display_errors 1 | |
php_value display_startup_errors 1 | |
php_value error_reporting 32767 | |
</If> |