sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
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
Enjoy ! 😄
Download iTerm2 here.
#!/bin/bash | |
# This script will download the contents of a GitHub repo | |
# and place them in a local directory. | |
# | |
# Usage: | |
# download-repo.sh <repo> <output-path> <nested-path> <branch-name> | |
# | |
# Example: | |
# download-repo.sh wattenberger/kumiko ./kumiko-assets master public/assets |
<?php | |
namespace Drupal\mymodule\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Provides a custom form. | |
*/ |
<!DOCTYPE html> | |
<head> | |
<meta charset="UTF-8"> | |
</head> | |
<body> | |
<div id="canvas"></div> | |
<button id="restart">Restart</button> | |
<script src="minesweeper.js"></script> | |
<style> | |
* { |
# 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") |
#! /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 "$@" |