Skip to content

Instantly share code, notes, and snippets.

@jazst21
jazst21 / common_sql_querries.sql
Created February 14, 2019 05:49 — forked from kartiknagpal/common_sql_querries.sql
SQL: common sql queries
+-----------+
# DATABASES #
+-----------+
#list all databases
SHOW DATABASES;
#use a database
USE `db_name`;

Docker cheatsheet

Docker

Terminology

Image -> Container (called Task if it's in a Service) -> Service -> Stack -> Swarm

  • Image: An ordered collection of root filesystem changes and the corresponding execution parameters for use within a container runtime. Portable Docker images are defined by something called a Dockerfile.
  • Container: A container is a runtime instance of a docker image.
##redis有設密碼的初始化方式
redisClient = redis.createClient({host:config.redisIP, port:config.redisPort, password:config.redisPwd});
## connect redis
var redis = require('redis'),
client = redis.createClient(6379, '127.0.0.1',{});