Skip to content

Instantly share code, notes, and snippets.

@dishuostec
dishuostec / nanoeventsplus.js
Last active September 4, 2019 09:56
Simple and tiny event emitter library for JavaScript, support wildcard event name.
/*
fork from https://github.com/ai/nanoevents
changes:
- support listening wildcard event name
- return handler result, use Promise.all() to wait task done.
*/
(
/**
* Interface for event subscription.
@dishuostec
dishuostec / list.txt
Created February 13, 2020 02:20
split config file
[foo]
foo 1
foo 2
[bar]
bar 1
bar 2
@dishuostec
dishuostec / 词性标记.md
Created January 26, 2021 07:04 — forked from luw2007/词性标记.md
词性标记: 包含 ICTPOS3.0词性标记集、ICTCLAS 汉语词性标注集、jieba 字典中出现的词性、simhash 中可以忽略的部分词性

词的分类

  • 实词:名词、动词、形容词、状态词、区别词、数词、量词、代词
  • 虚词:副词、介词、连词、助词、拟声词、叹词。

ICTPOS3.0词性标记集

n 名词

nr 人名

@dishuostec
dishuostec / ObjectType.d.ts
Last active March 31, 2022 05:43
Typescript utility types
/**
* ObjectKeys
* @desc Extract name from type or class
* @param T type to analyze
* @param MatchType type to keep. Default is any - all types be included
* @param Reverse reverse match. Default is false
* @example
* class SimpleClass {
* static ZERO = 0;
* readonly one: string = '1';
@dishuostec
dishuostec / Dockerfile
Created September 26, 2023 01:45
A container of Openvpn to shadowsocks adapter.
FROM shadowsocks/shadowsocks-libev:latest
USER root
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
ENV DNS_ADDRS=
# ---------- openvpn ----------
ENV OPENVPN_CFG=client.ovpn
RUN set -x \
&& apk add --update --no-cache openvpn