code screenshot beautify plugin & 代码截图美化插件

代码截图美化

codesnap

微信分享代码截图

https://github.com/kufii/CodeSnap

demo


"use strict"; /**
*
* @author xgqfrms
* @license MIT
* @copyright xgqfrms
* @created 2020-10-01
* @modified
*
* @description
* @difficulty Easy Medium Hard
* @complexity O(n)
* @augments
* @example
* @link
* @solutions
*
* @best_solutions
*
*/ const log = console.log; const Koa = require('koa');
const app = new Koa(); const port = 3000; // logger
app.use(async (ctx, next) => {
log(` 1`)
await next();
log(` 2`)
const rt = ctx.response.get('X-Response-Time');
log(`${ctx.method} ${ctx.url} - ${rt}`);
}); // x-response-time
app.use(async (ctx, next) => {
const start = Date.now();
log(` 3`)
await next();
log(` 4`)
const ms = Date.now() - start;
ctx.set('X-Response-Time', `${ms}ms`);
}); // response
app.use(async ctx => {
log(` 5`)
ctx.body = 'Hello World';
}); app.listen(port); /* Promise 先后顺序, async/await 1
3
5
4
2
GET /?q=xgqfrms - 2ms
1
3
5
4
2
GET /favicon.ico - 0ms */

自定义配置

Carbon

Carbon | Create and share beautiful images of your source code

https://carbon.now.sh/

https://github.com/carbon-app/carbon

refs



xgqfrms 2012-2020

www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


最新文章

  1. 必杀技———SQL基础整理系列(一)
  2. Oracle行转列(使用pivot函数)
  3. Oracle 查询今天、昨日、本周、本月和本季度的所有记录
  4. 函数式编程语言LISP,python,haskell,clojure
  5. Java初学(七)
  6. [改善Java代码]正确使用String,StringBuffer,StringBuilder
  7. 深入理解ReentrantLock
  8. 图片翻页效果引出的animate.css,很好玩,多动动吧~
  9. UESTC-888-Absurdistan Roads(kruskal+floyd)
  10. wpf中xps文档合并功能实现
  11. php面向对象1
  12. 遍历Map集合:java.util.Map.Entry、KeySet两种方式
  13. 如何导入css和js?
  14. gcc如何生成预编译头文件(.gch)
  15. Java NIO 概览
  16. IOT高性能服务器实现之路
  17. 【翻译】WhatsApp 加密概述(技术白皮书)
  18. python3 pip 安装Scrapy在win10 安装报错error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
  19. c#随机生成英文名
  20. 小程序 input 键盘弹出时样式遮盖问题

热门文章

  1. nfs samba文件共享服务
  2. CODING 再携手腾讯云 Serverless,让开发者跑步上云
  3. cookie加密 当浏览器全面禁用三方 Cookie
  4. setTimeout、Promise、Async/Await 的区别
  5. NOIP2020 移球游戏
  6. 分布式缓存 — redis
  7. (3)UNIX/Linux系统结构
  8. MySQL数据库迁移与MySQL数据库批量恢复
  9. linux(2)系统目录结构
  10. Educational Codeforces Round 41