Environment::scriptName()
=> string(33) "/environment-vs-request/index.php"
Request::getBaseUrl()
=> string(33) "/environment-vs-request/index.php"
This file contains hidden or 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
| #!/bin/bash | |
| docker image ls | awk '$1 == "<none>" || $2 == "<none>" { print $3; }' | xargs docker image rm |
This file contains hidden or 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
| FROM php:5.6-cli | |
| RUN apt-get update \ | |
| && apt-get install -y \ | |
| libfreetype6-dev \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && docker-php-ext-install iconv \ | |
| && apt-get remove -y \ | |
| libfreetype6-dev \ | |
| && apt-get install -y \ |
This file contains hidden or 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
| # @file /etc/systemd/system/docker-nginx.service | |
| # @see https://docs.docker.com/articles/host_integration/ | |
| [Unit] | |
| Description=nginx container | |
| Requires=docker.service | |
| After=docker.service | |
| [Service] | |
| Restart=always |
This file contains hidden or 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
| [client] | |
| user=root | |
| password=53CUr3-p422W0RD | |
| host=127.0.0.1 | |
| port=3306 |
This file contains hidden or 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
| # Prevent logging favicon.ico and robots.txt | |
| location = /favicon.ico { | |
| log_not_found off; | |
| access_log off; | |
| } | |
| location = /robots.txt { | |
| allow all; | |
| log_not_found off; | |
| access_log off; |
This file contains hidden or 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
| $('.accordion').on('toggled', function (event, accordion) { | |
| // show activated accordion | |
| if (accordion.hasClass('active')) { | |
| accordion.hide().slideDown(); | |
| } | |
| // hide previous activated accordions | |
| var group = $(event.target); | |
| var accordions = group.find('.accordion-navigation > .content:not(.active):visible'); | |
| accordions.slideUp(); |
This file contains hidden or 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 | |
| ... | |
| /** | |
| * Symfony session storage | |
| */ | |
| $memcached = new \Memcached(); | |
| $memcached->addServer($GLOBALS['TL_CONFIG']['sessionMemcachedHost'], $GLOBALS['TL_CONFIG']['sessionMemcachedPort']); |
This file contains hidden or 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 | |
| class Shipping | |
| { | |
| public function isAvailable() | |
| { | |
| // HOOK: allow to add custom logic | |
| if (isset($GLOBALS['ISO_HOOKS']['shippingIsAvailable']) && is_array($GLOBALS['ISO_HOOKS']['shippingIsAvailable'])) | |
| { | |
| foreach ($GLOBALS['ISO_HOOKS']['shippingIsAvailable'] as $callback) |
This file contains hidden or 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 | |
| $iterations = 1000000; | |
| echo <<<PHP | |
| <?php | |
| \$iterations = $iterations; | |
| \$style = 'default'; | |
| PHP; |