Skip to content

Instantly share code, notes, and snippets.

View joonaspessi's full-sized avatar

Joonas Pessi joonaspessi

  • Finland, Tampere
View GitHub Profile
@joonaspessi
joonaspessi / .eslintrc
Created October 22, 2020 16:19
.eslintrc with recommended default linting rules. All formatting rules that collapses with prettier are disabled.
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
]
}
@joonaspessi
joonaspessi / docker_entrypoint_vs_cmd.md
Last active October 15, 2020 13:51
Docker ENTRYPOINT vs CMD

Docker ENTRYPOINT vs CMD

ENTRYPOINT defines the main executable that Docker will use. If entrypoint is not given, then CMD will be used as a command that is executed.

CMD defines the default arguments for the ENTRYPOINT. Note that CMD argument can be overridden when running the container with alternative arguments.

We can think them as pair that are concatenated ENTRYPOINT + CMD.

For example, let's build container that pings three times a given network host. If no host is given, then it should ping localhost as a default.

# 0 is too far from ` ;)
set -g base-index 1
# Change default ctrl-b to ctrl-a
unbind C-b
set -g prefix C-a
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#!/bin/zsh
#
# This script installs prezto into a vagrant/*nix box which already has zsh and oh-my-zsh
# installed. It also replaces the prompt color and enables the git prezto module. If
# executed via the suggested command below, also the default shell is changed into zsh.
# BTW, if using this for a vagrant box, be sure to execute the command while ssh'd into
# the box.
#
# Usage: curl -L https://raw-gist-file-address-here.sh | zsh && chsh -s $(which zsh)
#