Enjoy ! 😄
Download iTerm2 here.
| #! /bin/bash | |
| # This runs a new Docker container, mounts the current directory (Drupal root), | |
| # and runs an arbitrary drush command, in case you don't want to run it in dsession. | |
| sudo docker run --rm -it --init -v "$(pwd)":/var/www/tome mortenson/tome drush "$@" |
Enjoy ! 😄
Download iTerm2 here.
| # On a Mac: /Users/<username>/.oh-my-zsh/custom/themes | |
| local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
| local emojis=("👋" "🤡" "🦄" "🤙" "🐼" "😊" "🔥" "⚡" "😎" "🌎") | |
| local selectedEmoji=${emojis[$[1+($RANDOM%${#emojis[@]})]]} | |
| local today=$(date +%m.%d) | |
| # local ipCountry=`curl -s ip-api.com/json | python -c "import sys, json; print json.load(sys.stdin)['country']"` | |
| # local country=$emoji_flags[${ipCountry}] | |
| # } | |
| case $today in | |
| "01.01") |
| ARG PHP_VERSION=7.2-fpm-stretch | |
| ARG COMPOSER_VERSION=latest | |
| # builder stage | |
| FROM php:$PHP_VERSION AS builder | |
| ARG AMQP_VERSION=1.9.3 | |
| ARG PHPREDIS_VERSION=4.1.1 | |
| RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests \ |
| <?php | |
| namespace Drupal\wh_signup\EventSubscriber; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| use Symfony\Component\HttpFoundation\RedirectResponse; | |
| use Symfony\Component\HttpFoundation\Request; | |
| use Symfony\Component\HttpKernel\Event\FilterResponseEvent; | |
| use Symfony\Component\HttpKernel\KernelEvents; |
| <?php | |
| /** | |
| * This plugin creates a new paragraph entity based on the source. | |
| * | |
| * @MigrateProcessPlugin( | |
| * id = "mds_paragraph" | |
| * ) | |
| */ | |
| class ParagraphMigrateProcessor extends ParagraphProcessBase { |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm