This file contains hidden or 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
| (function () { | |
| // canvas 实现 watermark | |
| function __canvasWM({ | |
| // 使用 ES6 的函数默认值方式设置参数的默认取值 | |
| // 具体参见 https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Functions/Default_parameters | |
| container = document.body, | |
| width = '200px', | |
| height = '150px', | |
| textAlign = 'center', | |
| textBaseline = 'middle', |
This file contains hidden or 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
| const fs = require('fs'); | |
| const path = require('path'); | |
| const fetch = require('node-fetch') | |
| const model = { | |
| "mode": | |
| "{\n \"data\": {}\n}", | |
| "url": "/test", | |
| "method": "get", | |
| "description": "description", |
This file contains hidden or 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
| FROM ubuntu:16.04 | |
| # add user group, user and make user home dir | |
| RUN groupadd --gid 1000 easy-mock && \ | |
| useradd --uid 1000 --gid easy-mock --shell /bin/bash --create-home easy-mock | |
| # set pwd to easy-mock home dir | |
| WORKDIR /home/easy-mock | |
| # install dependencies |
This file contains hidden or 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
| version: '3' | |
| services: | |
| mongodb: | |
| image: mongo:3.4.1 | |
| volumes: | |
| # ./data/db 数据库文件存放地址,根据需要修改为本地地址 | |
| - './data/db:/data/db' | |
| networks: | |
| - easy-mock |
This file contains hidden or 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
| systemd=true | |
| sys_bit=$(uname -m) | |
| is_path=true | |
| v2ray_transport=4 | |
| path=about | |
| v2ray_port=24000 | |
| email=michael.keepgoing #申请ssl时的邮箱 | |
| proxy_site=https://developer.mozilla.org # 代理跳转到的网址 | |
| domain=windart-api.chinanorth.cloudapp.chinacloudapi.cn # ssl申请时必需要的域名 |
This file contains hidden or 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
| // Part of https://github.com/chris-rock/node-crypto-examples | |
| // Nodejs encryption of buffers | |
| var crypto = require('crypto'), | |
| algorithm = 'aes-256-ctr', | |
| password = 'd6F3Efeq'; | |
| var fs = require('fs'); | |
| var zlib = require('zlib'); |