ESLint是一个前端、Node领域中流行的代码规范检查工具,使用起来很方便。
之前为了强制推行代码规范,我在CI任务中加入了ESLint检查。保障了规范的同时,也引入了痛点:CI的时长延长了2~3分钟左右。因为现在开发的工程体量比较大,ESLint会占用很多的内存、CPU资源,且运行时间较长。
% 1 | |
% UTF-8 encoding | |
% Compile with latex+dvipdfmx, pdflatex, xelatex or lualatex | |
% XeLaTeX is recommanded | |
\documentclass[UTF8]{ctexart} | |
\begin{document} | |
文章内容 | |
Hello world | |
\end{document} |
[Unit] | |
Description=Redis persistent key-value storage | |
After=network.target | |
[Service] | |
Type=notify | |
ExecStart=/usr/bin/redis-server /etc/redis.conf --supervised systemd --daemonize no | |
ExecStop=/usr/bin/redis-cli -p 6379 shutdown | |
ExecReload=/bin/kill -USR2 $MAINPID | |
Restart=always |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
import * as ts from 'typescript' | |
function makeFactorialFunction() { | |
const functionName = ts.factory.createIdentifier('factorial') | |
const paramName = ts.factory.createIdentifier('n') | |
const parameter = ts.factory.createParameterDeclaration( | |
undefined, | |
undefined, | |
undefined, | |
paramName, |
@classDecFactory() | |
class Student { | |
@propertyDecFactory() | |
name: string | |
@methodDecFactory() | |
run(@parameterDecFactory() arg: string) { | |
console.log(arg) | |
} | |
} |
asdf |
#!/usr/bin/python3 | |
import asyncio | |
import time | |
import socket | |
import argparse | |
import aiohttp | |
class MyConnector(aiohttp.TCPConnector): |
set statusline= | |
set showtabline=0 | |
set laststatus=0 | |
set ruler! | |
set noshowmode | |
set noshowcmd | |
let g:floaterm_width = 0.8 | |
let g:floaterm_height = 0.8 | |
let g:floaterm_title = '' | |
augroup cmdline |