Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| <?php | |
| /** | |
| * UUID class | |
| * | |
| * The following class generates VALID RFC 4122 COMPLIANT | |
| * Universally Unique IDentifiers (UUID) version 3, 4 and 5. | |
| * | |
| * UUIDs generated validates using OSSP UUID Tool, and output | |
| * for named-based UUIDs are exactly the same. This is a pure | |
| * PHP implementation. |
| cd ~ | |
| sudo yum update | |
| sudo yum install java-1.7.0-openjdk.i686 -y | |
| wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz | |
| tar -xf elasticsearch.tar.gz | |
| rm elasticsearch.tar.gz | |
| mv elasticsearch-* elasticsearch | |
| sudo mv elasticsearch /usr/local/share |
| <?php | |
| function cidr_match($ip, $ranges) | |
| { | |
| $ranges = (array)$ranges; | |
| foreach($ranges as $range) { | |
| list($subnet, $mask) = explode('/', $range); | |
| if((ip2long($ip) & ~((1 << (32 - $mask)) - 1)) == ip2long($subnet)) { | |
| return true; | |
| } | |
| } |
| #!/bin/bash | |
| # install homebrew's official php tap | |
| brew tap josegonzalez/homebrew-php | |
| # install homebrew-dupes (required to install zlib, php54's dependency) | |
| brew tap homebrew/dupes | |
| # install nginx + mysql + php 5.4 + php-fpm + apc + xdebug | |
| brew install nginx mysql |
| <?php | |
| /** | |
| * SplClassLoader implementation that implements the technical interoperability | |
| * standards for PHP 5.3 namespaces and class names. | |
| * | |
| * http://groups.google.com/group/php-standards/web/final-proposal | |
| * | |
| * // Example which loads classes for the Doctrine Common package in the | |
| * // Doctrine\Common namespace. |
Данный текст - мой набросок после филтрации огромного количества текстов.
По работе стоит задача реализации системы распределения прав. Дабы не строить велосипед, решил посмотреть в CI, Yii, Zend, и так далее. В итоге выяснилось, что даже именитые библиотеки вроде Zend_Acl не решают даже части проблем.
Для того, чтобы не держать в закладках уйму текста, было решено составить этот конспект. Если Вы случайно наткнулись на этот текст, и у Вас есть вопросы, мысли или предложения -
| #!/opt/local/bin/php | |
| <?php | |
| /* | |
| 1) replace the shebang (first line) with the path to your php binary | |
| (probably something like /usr/bin/php) | |
| 2) move the file to /usr/local/bin/datauri.php | |
| (this should be in your PATH) | |
| 3) chmod ugo+rx /usr/local/bin/datauri.php | |
| (make the script executable for everyone) |
The following describes the mandatory requirements that must be adhered to for autoloader interoperability.
\ <Vendor Name> \ (<Namespace>)* \ <Class Name>DIRECTORY_SEPARATOR when loading from the file system.DIRECTORY_SEPARATOR. The "_" character has no special meaning in the namespace.