导出本地数据最方便,指定数据库以及导出的路径即可。
mongodump --db some-database --out som-directory
导出远端数据的,指定 uri。
set -ex | |
# npm 也支持 git 仓库的,你也可以不打包 | |
git clone --branch=dev --depth=1 https://github.com/ElemeFE/element.git | |
cd element && yarn | |
npm run dist && npm run pack |
# 下面的这个命令更简洁一些,docker image ls -f "dangling=true" -q | |
IMAGES=`docker images -f "dangling=true" -q` | |
docker rmi $IMAGES | |
# 更为简洁的命令 | |
docker rmi -f $(docker images --filter "dangling=true" -q --no-trunc) |
const genInlineComponentText = require('./build/md-loader/util').genInlineComponentText; | |
const template = '<el-input v-model="input" placeholder="请输入内容"></el-input>'; | |
const script = ` | |
export default { | |
data() { | |
return { | |
input: '' | |
} |
const nodemailer = require('nodemailer'); | |
const config = require('./config.json'); | |
const wait = () => new Promise(resolve => setTimeout(resolve, 800)); | |
async function main() { | |
let transporter = nodemailer.createTransport({ | |
host: "email.example.com", | |
port: 587, | |
secure: false, // true for 465, false for other ports |
# https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html | |
version: '3' | |
services: | |
es01: | |
image: elasticsearch:7.2.0 | |
container_name: es01 | |
environment: | |
- node.name=es01 | |
- discovery.seed_hosts=es02 | |
- cluster.initial_master_nodes=es01,es02 |
version: "3" | |
services: | |
my-db: | |
image: "mysql:5.7" | |
container_name: "my-db" | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: 12345 | |
volumes: |
public class Run { | |
@Target(ElementType.PARAMETER) | |
@Retention(RetentionPolicy.RUNTIME) | |
static @interface QueryParam { | |
String value(); | |
} | |
public void testAnnotation(@QueryParam("action") String action) { | |
System.out.printf("action is %s\n", action); | |
} |
# go build link | |
PKG_NAME = github.com/ziyoung/repo | |
GO_LDFLAGS = -X ${PKG_NAME}/pkg.Var=123 | |
build: | |
go build -ldflags "${GO_LDFLAGS}" -o file ./some-file.go |