# Docker CLI Cheat Sheet
# Images
## Build an Image from a Dockerfile
```sh
docker build -t <image_name> .
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
/* Exercise: Loops and Functions #43 */ | |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(2.) |
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
##################################### VARIABLES ################################# | |
#Get the current directory of this Makefile as it may be included in other Makefiles | |
#http://stackoverflow.com/questions/18136918/how-to-get-current-directory-of-your-makefile | |
PSQL_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) | |
PSQL_DIR := $(abspath $(patsubst %/,%,$(dir $(PSQL_PATH)))) | |
#Get the path to the top most Makefile, or wherever this command was invoked from | |
TOP_PATH := $(shell pwd) |
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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Basic Options */ | |
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ | |
"module": "esnext", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |
"lib": [ /* Specify library files to be included in the compilation. */ | |
"es6", | |
"es7", | |
"esnext", | |
"dom" |
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
#!/bin/bash | |
# This way you can customize which branches should be skipped when | |
# prepending commit message. | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
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
. - Any Character Except New Line | |
\d - Digit (0-9) | |
\D - Not a Digit (0-9) | |
\w - Word Character (a-z, A-Z, 0-9, _) | |
\W - Not a Word Character | |
\s - Whitespace (space, tab, newline) | |
\S - Not Whitespace (space, tab, newline) | |
\b - Word Boundary | |
\B - Not a Word Boundary |