Skip to content

Instantly share code, notes, and snippets.

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


I may be slow to respond.
  • Shanghai
  • 17:56 (UTC -12:00)
View GitHub Profile
voldikss / redis.service
Created April 9, 2023 08:31 — forked from sshymko/redis.service
Redis service for systemd on Linux
View redis.service
Description=Redis persistent key-value storage
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
voldikss /
Created June 20, 2022 09:17 — forked from staltz/
The introduction to Reactive Programming you've been missing
View typescript-compiler-api.ts
import * as ts from 'typescript'
function makeFactorialFunction() {
const functionName = ts.factory.createIdentifier('factorial')
const paramName = ts.factory.createIdentifier('n')
const parameter = ts.factory.createParameterDeclaration(
View typescript_decorator.ts
class Student {
name: string
run(@parameterDecFactory() arg: string) {
voldikss / asdf
Created September 3, 2021 11:18
voldikss / gh-check
Created January 22, 2021 05:35 — forked from lilydjwg/gh-check
gh-check: speed test to known GitHub IPs
View gh-check
import asyncio
import time
import socket
import argparse
import aiohttp
class MyConnector(aiohttp.TCPConnector):
View vim-useful-text-objects.adoc

Some useful custom text objects for vim

Collection of my custom text objects I use quite often.

97975602 6e90ee00 1dda 11eb 9286 6894300457e3


Put it into your .vimrc:

voldikss / floaterm_nested_pic.vimrc
Created August 27, 2020 02:34
The config used to generate floaterm's nested-nvim demo
View floaterm_nested_pic.vimrc
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
View textobj.vim
" ============================================================================
" FileName: textobj.vim
" Author: voldikss <>
" GitHub:
" ============================================================================
function! lib#textobj#(pattern) abort
let pos = getpos('.')
let lnum = pos[1]
let cnum = pos[2]
voldikss /
Created February 29, 2020 13:49 — forked from mbinna/
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](