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
<registry xmlns="http://www.iana.org/assignments" id="uri-schemes"> | |
<title>Uniform Resource Identifier (URI) Schemes</title> | |
<updated>2013-03-01</updated> | |
<note>This is scraped from the Official IANA Registry of URI Schemes HTML</note> | |
<scraped href="http://www.iana.org/assignments/uri-schemes.html">2013-03-10</scraped> | |
<registry id="uri-schemes-1"> | |
<title>Permanent URI Schemes</title> | |
<xref type="rfc" data="rfc4395"/> | |
<registration_rule>Expert Review</registration_rule> | |
<expert>Graham Klyne</expert> |
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
<IfModule mod_rewrite.c> | |
# skip "real" requests | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteRule .* - [QSA,L] | |
# all "unreal" requests go to index.php | |
RewriteRule .* index.php [QSA,L] | |
</IfModule> |
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 | |
/** | |
* PHP Object as property | |
* @link http://stackoverflow.com/questions/15273033/php-object-as-property | |
*/ | |
Interface Person | |
{ | |
/** | |
* @return string |
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 | |
/** | |
* PHP function in XML? | |
* @link http://stackoverflow.com/q/14888921/367456 | |
* @link https://gist.github.com/hakre/4959346 | |
* @link http://eval.in/9908 | |
* @author hakre <hakre.wordpress.com> | |
*/ | |
$xml = <<<BUFFER |
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 | |
/** | |
* In SimpleXML, how can I add an existing SimpleXMLElement as a child element? | |
* | |
* @link http://stackoverflow.com/q/767327/367456 | |
* @link http://eval.in/9568 | |
* @link http://3v4l.org/1sI05 | |
*/ | |
/** |
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 | |
/** | |
* PHP: Algorithm for recursive string subset extraction | |
* @link http://stackoverflow.com/q/14532139/367456 | |
* @link https://gist.github.com/4642090 | |
* @link http://eval.in/7578 | |
*/ | |
$subject = 'abc{def}ghij{kl{mn}o{pq}}r{s{t{u{v}}w}}xyz'; |
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 | |
/** | |
* Codepad Viper Remote Image Viewer | |
*/ | |
$urls = ['http://i.stack.imgur.com/Pa9s3.png']; | |
$removes = []; | |
if (isset($_GET['g'])) $urls = array_filter((array) $_GET['g']); | |
if (isset($_GET['r'])) $removes = (array) $_GET['r']; |
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 | |
/** | |
* Random Iterator - Picking n Iterations random out of x Iterations (Reservoir sampling) | |
* | |
* TODO Preserve Iteration Keys | |
* | |
* @author hakre | |
*/ | |
class RandomIterator implements IteratorAggregate | |
{ |
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 | |
/** | |
* Pagination Class for SQL LIMIT clauses | |
* | |
* @author hakre <http://hakre.wordpress.com/> | |
* @link http://stackoverflow.com/a/23444110/367456 | |
*/ | |
class LimitPagination | |
{ | |
private $perPage, $page, $totalCount; |
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 | |
/* | |
* Get all 52 weeks of the year and work days given the first day of the January of current year | |
* @link http://stackoverflow.com/a/14147613/367456 | |
* @author hakre <http://hakre.wordpress.com/credits> | |
*/ | |
/** | |
* Filter a DatePeriod by year | |
*/ |