A list of amazingly awesome PHP libraries, resources and shiny things.
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
| /* | |
| A (very) WIP collection of optimized/recommended jQuery plugin patterns | |
| from @addyosmani, @cowboy, @ajpiano and others. | |
| Disclaimer: | |
| ----------------------- | |
| Whilst the end-goal of this gist is to provide a list of recommended patterns, this | |
| is still very much a work-in-progress. I am not advocating the use of anything here | |
| until we've had sufficient time to tweak and weed out what the most useful patterns |
| /* | |
| * 'Highly configurable' mutable plugin boilerplate | |
| * Author: @markdalgleish | |
| * Further changes, comments: @addyosmani | |
| * Licensed under the MIT license | |
| */ | |
| // Note that with this pattern, as per Alex Sexton's, the plugin logic | |
| // hasn't been nested in a jQuery plugin. Instead, we just use | |
| // jQuery for its instantiation. |
| // if (!window.L) { window.L = function () { console.log(arguments);} } // optional EZ quick logging for debugging | |
| /** | |
| * A modified (improved?) version of the jQuery plugin design pattern | |
| * See http://docs.jquery.com/Plugins/Authoring (near the bottom) for details. | |
| * | |
| * ADVANTAGES OF EITHER FRAMEWORK: | |
| * - Encapsulates additional plugin action methods without polluting the jQuery.fn namespace | |
| * - Ensures ability to use '$' even in compat modes | |
| * |
| <?php | |
| $path = $_SERVER['DOCUMENT_ROOT']; //gets the path to your root directory of your site | |
| //now all links instead of being: | |
| // (images/index.php) and have it be different across all pages, use this: | |
| include_once ($path . '/layout/footer.php'); //and it is now universal across all pages | |
| //found at: http://css-tricks.com/php-include-from-root/ | |
| ?> |
A list of amazingly awesome PHP libraries, resources and shiny things.
| <?php | |
| // | |
| // this gist takes most of the code from https://gist.github.com/3176917 but adds in form uploading which is just an @ symbol | |
| // this also explores different options for the form data | |
| // | |
| // curl_post_upload.php | |
| // You can modify this script to make PHP use a webpage like a person sitting | |
| // at a computer would use a webpage. | |
| // | |
| // tags: #php #curl #form #upload |