Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| <?php | |
| namespace moneygram\extensions\imagine; | |
| use Imagine\Image\Box; | |
| use Imagine\Image\Point; | |
| use Imagine\Image\Color; | |
| class SepiaToneFilter implements \Imagine\Filter\FilterInterface { |
| <?php | |
| /* | |
| Usage: | |
| $rest = new REST($config); | |
| $result = $rest->get('http://example.com/method, array( | |
| 'name' => 'value', | |
| ... | |
| )); |
| packages: | |
| yum: | |
| newrelic-php5: [] | |
| rpm: | |
| newrelic: http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm | |
| commands: | |
| configure_new_relic: | |
| command: newrelic-install install | |
| env: | |
| NR_INSTALL_SILENT: true |
| /* | |
| * jQuery offscreen plugin | |
| * | |
| * Filters that detect when an element is partially or completely outside | |
| * of the viewport. | |
| * | |
| * Usage: | |
| * | |
| * $('#element').is(':off-bottom') | |
| * |
| if (!document.querySelectorAll) { | |
| document.querySelectorAll = function (selectors) { | |
| var style = document.createElement('style'), elements = [], element; | |
| document.documentElement.firstChild.appendChild(style); | |
| document._qsa = []; | |
| style.styleSheet.cssText = selectors + '{x-qsa:expression(document._qsa && document._qsa.push(this))}'; | |
| window.scrollBy(0, 0); | |
| style.parentNode.removeChild(style); |
| <?php | |
| class Module | |
| { | |
| public function onBootstrap($e) | |
| { | |
| $app = $e->getApplication(); | |
| $events = $app->getEventManager(); | |
| // Direct instantiation | |
| $events->attach(new RouteNotFoundListener()); |