-
Notifications
You must be signed in to change notification settings - Fork 514
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from vungoccuong/master
Add more cheatsheets
- Loading branch information
Showing
5 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Builds, (re)creates, starts, and attaches to containers for all services | ||
docker-compose up | ||
|
||
# Builds, (re)creates, starts, and dettaches to containers for all services | ||
docker-compose up -d | ||
|
||
# Builds, (re)creates, starts, and attaches to containers for a service | ||
docker-compose up -d <service_name> | ||
|
||
# Builds, (re)creates, starts, and dettaches to containers for a service | ||
docker-compose up -d <service_name> | ||
|
||
# Print the last lines of a service’s logs | ||
docker-compose logs --tail 100 <service_name> | less | ||
|
||
# Print the last lines of a service's logs and following its logs | ||
docker-compose logs -f --tail 100 <service_name> | ||
|
||
# Stops containers and removes containers, networks created by up | ||
docker-compose down |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# initial new package | ||
npm init | ||
|
||
# initial immediately a new package | ||
npm init -y | ||
|
||
# install all dependencies packages | ||
npm install | ||
|
||
# install all dev dependencies packages | ||
npm install --save-dev | ||
|
||
# install a specified package | ||
npm install <package_name> | ||
|
||
# install a specified dev package | ||
npm install <package_name> --save-dev | ||
|
||
# install globally a specified package | ||
npm install <package_name> -g |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# install a specified version of node | ||
nvm install <version> | ||
|
||
# list available versions | ||
nvm ls-remote | ||
|
||
# use installed node's version | ||
nvm use <version> | ||
|
||
# set a node's version as default | ||
nvm alias default <version> |