const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
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
| '400x300' # resize, maintain aspect ratio | |
| '400x300!' # force resize, don't maintain aspect ratio | |
| '400x' # resize width, maintain aspect ratio | |
| 'x300' # resize height, maintain aspect ratio | |
| '400x300>' # resize only if the image is larger than this | |
| '400x300<' # resize only if the image is smaller than this | |
| '50x50%' # resize width and height to 50% | |
| '400x300^' # resize width, height to minimum 400,300, maintain aspect ratio | |
| '2000@' # resize so max area in pixels is 2000 | |
| '400x300#' # resize, crop if necessary to maintain aspect ratio (centre gravity) |
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
| $ docker-compose up -d # start containers in background | |
| $ docker-compose kill # stop containers | |
| $ docker-compose up -d --build # force rebuild of Dockerfiles | |
| $ docker-compose rm # remove stopped containers | |
| $ docker ps # see list of running containers | |
| $ docker exec -ti [NAME] bash # ssh to the container | |
| # list all images | |
| docker images |