Skip to content

Instantly share code, notes, and snippets.

View voldikss's full-sized avatar
💭
I may be slow to respond.

voldikss

💭
I may be slow to respond.
  • Shanghai
  • 01:51 (UTC -12:00)
View GitHub Profile

ESLint的缓存机制及其在CI中的应用

背景

ESLint是一个前端、Node领域中流行的代码规范检查工具,使用起来很方便。

之前为了强制推行代码规范,我在CI任务中加入了ESLint检查。保障了规范的同时,也引入了痛点:CI的时长延长了2~3分钟左右。因为现在开发的工程体量比较大,ESLint会占用很多的内存、CPU资源,且运行时间较长。

@voldikss
voldikss / redis.service
Created April 9, 2023 08:31 — forked from sshymko/redis.service
Redis service for systemd on Linux
[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
@voldikss
voldikss / introrx.md
Created June 20, 2022 09:17 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@voldikss
voldikss / gh-check
Created January 22, 2021 05:35 — forked from lilydjwg/gh-check
gh-check: speed test to known GitHub IPs
#!/usr/bin/python3
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):

Some useful custom text objects for vim

Collection of my custom text objects I use quite often.

97975602 6e90ee00 1dda 11eb 9286 6894300457e3

Numbers

Put it into your .vimrc:

@voldikss
voldikss / effective_modern_cmake.md
Created February 29, 2020 13:49 — forked from mbinna/effective_modern_cmake.md
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@voldikss
voldikss / actionlist.vim
Created August 15, 2019 05:03 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@voldikss
voldikss / fft.txt
Created May 16, 2018 03:21 — forked from MaskRay/fft.txt
FFT技巧
https://www.hackerrank.com/contests/w23/challenges/sasha-and-swaps-ii
感谢ftiasch老师教导,参考了 https://async.icpc-camp.org/d/408-fft 和其他一些地方的东西
P = 1e9+7
Q = ceil(sqrt(P))
a, b为两个向量
c = convolution(a, b)
c系数取值为 [0, n*(P-1)^2] 的整数,若n*(P-1)^2的表示需要超过53 bits(double mantissa)则很可能会出错
@voldikss
voldikss / AssemblyLanguage.md
Created October 20, 2017 08:48 — forked from v4lour/AssemblyLanguage.md
汇编语言(王爽著)笔记

汇编语言(王爽著)笔记

@v4lour

第一章 基础知识

汇编语言是直接在硬件上工作的编程语言,由以下3类指令组成:

  • 汇编指令:机器码的助记符,有对应的机器码
  • 伪指令:没有对应的机器码,由编译器执行