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 | |
/* | |
* dl-file.php | |
* | |
* Protect uploaded files with login. | |
* | |
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in | |
* | |
* @author hakre <http://hakre.wordpress.com/> | |
* @license GPL-3.0+ |
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 | |
/** | |
* imap-attachment.php | |
* | |
* @author hakre <hakre.wordpress.com> | |
* @link http://stackoverflow.com/questions/9974334/how-to-download-mails-attachment-to-a-specific-folder-using-imap-and-php | |
*/ | |
/** | |
* Utility Class |
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
ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII | |
UTF-8 | |
ISO-10646-UCS-2 UCS-2 CSUNICODE | |
UCS-2BE UNICODE-1-1 UNICODEBIG CSUNICODE11 | |
UCS-2LE UNICODELITTLE | |
ISO-10646-UCS-4 UCS-4 CSUCS4 | |
UCS-4BE | |
UCS-4LE | |
UTF-16 | |
UTF-16BE |
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 | |
/** | |
* Callback Decorator | |
* | |
* Providing reflection and invoking | |
* with named function arguments. | |
* | |
* @version 0.0.1 | |
* @see http://stackoverflow.com/q/8649536/367456 |
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 | |
/* | |
* Iteration and Recursive Iteration Examples Code | |
* | |
* @link http://stackoverflow.com/questions/12077177/how-does-recursiveiteratoriterator-works-in-php | |
* @author hakre <http://hakre.wordpress.com> | |
*/ | |
### To have these examples to work, a directory with subdirectories is needed, | |
### I named mine "tree": |
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 | |
/* | |
* Converting a massive CSV to a specific XML format | |
* | |
* @link http://stackoverflow.com/a/32034227/367456 | |
*/ | |
/** | |
* Class XmlEncoder | |
* |
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
@if (@X)==(@Y) @end /* Harmless hybrid line that begins a JScript comment | |
::************ Documentation *********** | |
::REPL.BAT version 5.0 | |
::: | |
:::REPL Search Replace [Options [SourceVar]] | |
:::REPL /?[REGEX|REPLACE] | |
:::REPL /V | |
::: | |
::: Performs a global regular expression search and replace operation on |
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 | |
/** | |
* Change Admin URL | |
* | |
* Copyright (C) 2010 hakre <http://hakre.wordpress.com/> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU Affero General Public License as | |
* published by the Free Software Foundation, either version 3 of the | |
* License, or (at your option) any later version. |
NewerOlder