$ docker build -t my-image . # Create image using this directory's Dockerfile
$ docker run -p 4200:80 my-image # Run "my-image" mapping port 4200 to 80
$ docker run -d -p 4200:80 my-image # Same thing, but in detached mode
$ docker run username/repository:tag # Run image from a registry
import click | |
# the version number to show. If None Click attempts an auto discovery via setuptools. | |
VERSION = "0.1" | |
@click.group() | |
@click.version_option(VERSION, "-v", "--version") | |
def cli(): | |
pass |
import click | |
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) | |
@click.group(context_settings=CONTEXT_SETTINGS) | |
def cli(): | |
pass |
$ python -m http.server # Create a webserver serving files relative to the current directory
$ python -m http.server 8080 # Start the webserver on port 8080
$ python -m http.server -b 127.0.0.1 # Bind the webserver to 127.0.0.1
$ python -m http.server -d path/to/files # Serve files relative to path/to/files
$ ember install ember-cli-postcss # Install ember-cli-postcss
$ npm install --save-dev tailwindcss # Install tailwindcss
$ npx tailwind init app/styles/tailwind.config.js # Optional: Generate a Tailwind config file for your project
$ npm install -save-dev postcss-import # Optional: If you want to use the @import statement
With the help of ShowdownJs and HighlightJs you can build an Markdown component with syntax highlighting.
ShowdownJs is an easy to use Markdown to HTML converter, it can be used in both client side (browser) or server side (with nodejs).
HighlightJs is an JavaScript library for syntax highlighting on the web. It supports 189 languages and 94 styles.
Markdown is a lightweight markup language that you can use to add formatting elements to plaintext text documents. Created by John Gruber in 2004, Markdown is now one of the world’s most popular markup languages.
# This is an tag
URL Parameters (Query Parameters) are a set o key value pars attached to the end of a url. They are used to send small amounts of data from page to page, or from client to server via a URL.
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);