Skip to content

Instantly share code, notes, and snippets.

View GoodManWEN's full-sized avatar
😇
他走的很安详

GoodManWEN

😇
他走的很安详
View GitHub Profile
@GoodManWEN
GoodManWEN / kvrocks_config_file_chs_translate.conf
Created February 21, 2023 16:50
kvrocks_config_file_chs_translate
################################ TRANSLATE INFO ##############################
# 中英对照翻译。
# 使用DEEPL翻译+人工校验使大多数句子通畅、可以理解。
# 基于kvrocks 2.2.0版本默认配置文件。
# 实际配置参数部分有略微修改,请勿直接复制使用。
################################ GENERAL #####################################
# By default kvrocks listens for connections from localhost interface. It is possible to listen to just one or multiple interfaces using the "bind" configuration directive, followed by one or more IP addresses.
# 默认情况下,kvrocks监听来自localhost接口的连接。可以使用 "bind "配置指令来监听一个或多个接口,后面加上一个或多个IP地址。
@GoodManWEN
GoodManWEN / sync_file_last_commit_time.py
Created April 14, 2022 09:35
Change the last access time of the file to the last commit time of git
import os
import re
import time
import subprocess
from win32file import CreateFile, SetFileTime, GetFileTime, CloseHandle
from win32file import GENERIC_READ, GENERIC_WRITE, OPEN_EXISTING
from pywintypes import Time # pip install pywin32
from pipeit import *
# config for chinese

source

import contextlib
import sys


def your_task():
    print("The test !")
const fs = require('fs');
let data = fs.readFileSync('IRONCLAD.autosave.json', 'utf8');
const out = [];
for (let i = 0; i < data.length; i++) {
const key = 'key';
out.push(data.charCodeAt(i) ^ key.charCodeAt(i % key.length));
}
@GoodManWEN
GoodManWEN / pipe_draft.py
Last active January 13, 2021 01:39
pipe_draft
from functools import partial
from typing import Callable
__all__ = (
'PIPE',
'END'
)
class _pipe_end:
...