Skip to content

Instantly share code, notes, and snippets.

View ianstarz's full-sized avatar

Ian Storz ianstarz

View GitHub Profile
@ianstarz
ianstarz / immutable-deep-filter.js
Last active March 23, 2017 17:39
Deep filter for nested Immutable Maps and Lists
import Immutable from 'immutable';
const { isIterable } = Immutable.Iterable;
const { isMap } = Immutable.Map;
const { isList } = Immutable.List;
const isLeafNode = (node) => {
if (!isIterable(node)) {
return true;
}
@ianstarz
ianstarz / docker-cheat-sheet.sh
Last active August 29, 2017 23:41
Docker cheat sheet
# https://docs.docker.com/get-started/part2/#conclusion-of-part-two
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker container ls # List all running containers
docker container ls -a # List all containers, even those not running
docker container stop <hash> # Gracefully stop the specified container
docker container kill <hash> # Force shutdown of the specified container
docker container rm <hash> # Remove specified container from this machine
docker container rm $(docker container ls -a -q) # Remove all containers