From e6486d6b26723ad430e6eefcfda9cc1855afd44e Mon Sep 17 00:00:00 2001 From: Denis Isidoro Date: Mon, 14 Oct 2019 13:51:58 -0300 Subject: [PATCH] Fix some cheatsheets --- cheats/docker-compose.cheat | 20 ------------------ cheats/docker.cheat | 28 +++++++++++++++++++++++++- cheats/git.cheat | 2 +- cheats/{npm.cheat => javascript.cheat} | 19 +++++++++++++++++ cheats/nvm.cheat | 11 ---------- 5 files changed, 47 insertions(+), 33 deletions(-) delete mode 100644 cheats/docker-compose.cheat rename cheats/{npm.cheat => javascript.cheat} (61%) delete mode 100644 cheats/nvm.cheat diff --git a/cheats/docker-compose.cheat b/cheats/docker-compose.cheat deleted file mode 100644 index 4aee3f3..0000000 --- a/cheats/docker-compose.cheat +++ /dev/null @@ -1,20 +0,0 @@ -# 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 - -# Builds, (re)creates, starts, and dettaches to containers for a service -docker-compose up -d - -# Print the last lines of a service’s logs -docker-compose logs --tail 100 | less - -# Print the last lines of a service's logs and following its logs -docker-compose logs -f --tail 100 - -# Stops containers and removes containers, networks created by up -docker-compose down \ No newline at end of file diff --git a/cheats/docker.cheat b/cheats/docker.cheat index 66f76b4..2601a21 100644 --- a/cheats/docker.cheat +++ b/cheats/docker.cheat @@ -43,4 +43,30 @@ docker logs --tail 100 -f docker network create $ image_id: docker images --- --headers 1 --column 3 -$ container_id: docker ps --- --headers 1 --column 1 \ No newline at end of file +$ container_id: docker ps --- --headers 1 --column 1 + + + + +% docker-compose, container + +# 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 + +# Builds, (re)creates, starts, and dettaches to containers for a service +docker-compose up -d + +# Print the last lines of a service’s logs +docker-compose logs --tail 100 | less + +# Print the last lines of a service's logs and following its logs +docker-compose logs -f --tail 100 + +# Stops containers and removes containers, networks created by up +docker-compose down \ No newline at end of file diff --git a/cheats/git.cheat b/cheats/git.cheat index 557d976..540e1bf 100644 --- a/cheats/git.cheat +++ b/cheats/git.cheat @@ -81,7 +81,7 @@ git fetch origin pull//head:pr/ \ && git checkout pr/ # Add a new module -git submodule add [] +git submodule add # Update module git submodule update --init diff --git a/cheats/npm.cheat b/cheats/javascript.cheat similarity index 61% rename from cheats/npm.cheat rename to cheats/javascript.cheat index b44fde6..1b03ed6 100644 --- a/cheats/npm.cheat +++ b/cheats/javascript.cheat @@ -1,3 +1,5 @@ +% npm, node, js + # initial new package npm init @@ -18,3 +20,20 @@ npm install --save-dev # install globally a specified package npm install -g + + + + +% nvm, node, js + +# install a specified version of node +nvm install + +# list available versions +nvm ls-remote + +# use installed node's version +nvm use + +# set a node's version as default +nvm alias default \ No newline at end of file diff --git a/cheats/nvm.cheat b/cheats/nvm.cheat deleted file mode 100644 index e5e046d..0000000 --- a/cheats/nvm.cheat +++ /dev/null @@ -1,11 +0,0 @@ -# install a specified version of node -nvm install - -# list available versions -nvm ls-remote - -# use installed node's version -nvm use - -# set a node's version as default -nvm alias default \ No newline at end of file