While doing the docker tutorial, I found that I wanted to do docker start [all containers] or docker stop [all running containers], which isn’t an explicit command. However, with docker ps -q, you can get a list of processes by only their ids. So:
List currently running containers
docker ps
List currently running containers (ids only)
docker ps -q
List all containers
docker ps -a
List all containers (ids only)
docker ps -aq
Start all containers (this doesn't restart containers that are already running)
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
| faker.helpers.randomize(array) - takes an array and returns a random element from it | |
| randomize(['a', 'b', 'c']) => 'b' | |
| randomize(['a', 'b', 'c']) => 'a' | |
| randomize(['a', 'b', 'c']) => 'a' | |
| randomize(['a', 'b', 'c']) => 'c' | |
| randomize(['a', 'b', 'c']) => 'b' | |
| faker.helpers.slugify(string) - makes a string into a slug, i.e. strips spaces and punctuation except for period and separates words with a hyphen | |
| slugify('String. Needs to be a slug?') => 'String.-Needs-to-be-a-slug' |
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
| #zsh | |
| sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
| #in ~/.zsh ZSH_THEME="agnoster" | |
| #you can try chsh -s /bin/bash to set the bash as the default, or chsh -s /bin/zsh to set the zsh as the default. | |
| git clone https://github.com/powerline/fonts | |
| cd fonts | |
| ./install.sh | |
| Paste into .zshrc | |
| alias ll='ls -la' |
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
| //Common npm packages (eslint is used in VSCode) | |
| npm i -g sass eslint eslint-plugin-react eslint-plugin-mocha jshint live-server | |
| //To install these extensions in VSCode hit Command-Shift-P and type "Shell" until "Shell Command: install 'code' command in path" then run the next line from terminal | |
| code --install-extension coenraads.bracket-pair-colorizer --install-extension dbaeumer.jshint --install-extension dbaeumer.vscode-eslint --install-extension dsznajder.es7-react-js-snippets --install-extension eamodio.gitlens --install-extension HookyQR.beautify --install-extension ms-vscode.sublime-keybindings --install-extension msjsdiag.debugger-for-chrome --install-extension WallabyJs.quokka-vscode --install-extension robertohuertasm.vscode-icons |
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
| //Cmd-shift-P, `Shell command: Install 'code' command in PATH` | |
| { | |
| "editor.detectIndentation": false, | |
| "editor.tabSize": 2, | |
| "editor.wordWrap": "on", | |
| "emmet.includeLanguages": { | |
| "javascript": "javascriptreact", | |
| "vue-html": "html" | |
| } | |
| "jshint.options": { |