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 | |
| use Drupal\Core\Config\FileStorage; | |
| // Empty destination dir and then write all .yml files there. | |
| $source_storage = Drupal::service('config.storage'); | |
| $destination_storage = new FileStorage('/tmp/config'); | |
| // Export configuration | |
| foreach ($source_storage->listAll() as $name) { | |
| $destination_storage->write($name, $source_storage->read($name)); |
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 | |
| // ... | |
| use Drupal\Core\Session\AccountProxyInterface; | |
| use Symfony\Component\DependencyInjection\ContainerInterface; | |
| use Psr\Log\LoggerInterface; | |
| class EntityResource extends ResourceBase { | |
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 | |
| /** | |
| * @file | |
| * Contains Drupal\dmouse\Controller\SubRequestController. | |
| * Generated by drupal/console. | |
| */ | |
| namespace Drupal\dmouse\Controller; |
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
| ; Enable xdebug extension module | |
| zend_extension=/usr/lib64/php/modules/xdebug.so | |
| xdebug.collect_params=3 | |
| xdebug.show_local_vars=5 | |
| xdebug.dump.GET=* | |
| xdebug.dump.POST=* | |
| ; see http://xdebug.org/docs/all_settings | |
| xdebug.collect_params=1 |
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
| function _git_branch_name | |
| echo (git symbolic-ref HEAD ^/dev/null | sed -e 's|^refs/heads/||') | |
| end | |
| function fish_prompt | |
| set_color green --bold | |
| printf '%s [at] ' (whoami) | |
| set_color blue | |
| printf '%s ' (hostname) |
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.5-apache | |
| RUN apt-get update && apt-get install -y \ | |
| libfreetype6-dev \ | |
| libjpeg62-turbo-dev \ | |
| libmcrypt-dev \ | |
| libpng12-dev \ | |
| libbz2-dev \ | |
| curl \ | |
| git \ |
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 ubuntu:14.04 | |
| # Replace 1000 with your user / group id | |
| RUN export uid=1000 gid=1000 && \ | |
| mkdir -p /home/developer && \ | |
| echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \ | |
| echo "developer:x:${uid}:" >> /etc/group && \ | |
| echo "developer ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/developer && \ | |
| chmod 0440 /etc/sudoers.d/developer && \ | |
| chown ${uid}:${gid} -R /home/developer |
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 | |
| $sttyMode = shell_exec('stty -g'); | |
| shell_exec('stty -icanon -echo'); | |
| $stdout = fopen('php://stdout', 'w'); | |
| fwrite($stdout, " 1.- option 1" . PHP_EOL ); | |
| fwrite($stdout, " 2.- option 2" . PHP_EOL ); | |
| fwrite($stdout, " 3.- option 3" . PHP_EOL ); |
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
| function docker-ip | |
| docker inspect --format '{{ .Name }} {{ .NetworkSettings.IPAddress }}' $argv; | |
| end |