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
  • 20:12 (UTC -12:00)
View GitHub Profile
@voldikss
voldikss / docker-registry-mirrors.md
Created June 8, 2024 13:54 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

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
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)
}
}
@voldikss
voldikss / asdf
Created September 3, 2021 11:18
asdf
asdf
@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 / floaterm_nested_pic.vimrc
Created August 27, 2020 02:34
The config used to generate floaterm's nested-nvim demo
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