Skip to content

Shortcuts And Commands

Baltasar Brito edited this page Nov 15, 2019 · 4 revisions

Shortcuts and commands

Table of contents

Bash

  • List files: ls.
  • List files including hidden ones: ls -a.
  • List processes: ps.
  • Pipe: |. This command feeds the output of a program to the input of another. For instance: ls | head -3.
  • Open file inside the command line: vi filename.
  • List reserved ports: netsh interface ipv4 show excludedportrange protocol=tcp.
  • Create directory: mkdir.

Docker

Commands

  • Turn container on: docker-compose up.
  • Turn container off: docker-compose down.
  • List processes: docker-compose ps.
  • List processes that contain a specific group of characters in it's name: docker ps | grep <nameToFilterBy>.

Command Flags

  • Run in the background: -d. (daemon)

Errors

  • bind: An attempt was made to access a socket in a way forbidden by its access permissions. Go to the command line and check the current reserved tcp ports with the command: netsh interface ipv4 show excludedportrange protocol=tcp. Check the docker-compose.yml file that the service complaining is not configured with a port within a reserved range and change it if it is. Don't forget to change the configurations on Visual Studio if any.

Google Chrome

Keyboard Shortcuts

  • Open new tab: Ctrl + T.
  • Close current tab: Ctrl + W.
  • Switch tabs:
    • To the tab on the right: Ctrl + Tab.
    • To tab on the left: Ctrl + Shift + Tab.

Linux

  • Super user do: sudo.
  • Install new package: apt-get install <package name>.

Node

Visual Studio 2019

Keyboard Shortcuts

  • Comment block of code: Ctrl + K, C.
  • Uncomment block of code: Ctrl + K, U.
  • Go to previous cursor coordinates: Ctrl + -.
  • Go to method's implementation: Ctrl + F12.
  • Find all references: Shift + F12.
  • Format selected block of code: Ctrl + K, F.
  • Go to specific line: Ctrl + G.
  • Move line:
    • Up: Alt + up arrow.
    • Down: Alt + down arrow.
  • List method parameters: Ctrl + Shift + spacebar.
  • Delete line: Ctrl + L.
  • Select word under cursor: Ctrl + K.

Visual Studio Code

Keyboard Shortcuts

  • Delete line: Ctrl + Shift + K.