Skip to content

Instantly share code, notes, and snippets.

Avatar
🐶
Occupied

ipid ipid

🐶
Occupied
  • Beijing University of Posts and Communications
  • Beijing, China
  • Twitter @ipid__
View GitHub Profile
@vxgmichel
vxgmichel / aioudp.py
Last active Dec 1, 2022
High-level UDP endpoints for asyncio
View aioudp.py
"""Provide high-level UDP endpoints for asyncio.
Example:
async def main():
# Create a local UDP enpoint
local = await open_local_endpoint('localhost', 8888)
# Create a remote UDP enpoint, pointing to the first one
@52cik
52cik / npm.taobao.sh
Last active Sep 13, 2022
npm 淘宝镜像配置
View npm.taobao.sh
npm set registry https://r.npm.taobao.org # 注册模块镜像
npm set disturl https://npm.taobao.org/dist # node-gyp 编译依赖的 node 源码镜像
## 以下选择添加
npm set sass_binary_site https://npm.taobao.org/mirrors/node-sass # node-sass 二进制包镜像
npm set electron_mirror https://npm.taobao.org/mirrors/electron/ # electron 二进制包镜像
npm set ELECTRON_MIRROR https://cdn.npm.taobao.org/dist/electron/ # electron 二进制包镜像
npm set puppeteer_download_host https://npm.taobao.org/mirrors # puppeteer 二进制包镜像
npm set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver # chromedriver 二进制包镜像
npm set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver # operadriver 二进制包镜像
@p2004a
p2004a / defer.cpp
Last active May 30, 2022
Simple defer macro for c++
View defer.cpp
// SPDX-FileCopyrightText: 2015 Marek Rusinowski
// SPDX-License-Identifier: MIT
#include <memory>
#include <cstdio>
template<typename F>
class defer_finalizer {
F f;
bool moved;
public:
@jbroadway
jbroadway / Slimdown.md
Last active Sep 8, 2022
Slimdown - A simple regex-based Markdown parser.
View Slimdown.md
View regex-japanese.txt
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)