Skip to content

Instantly share code, notes, and snippets.

View wayou's full-sized avatar
👁️‍🗨️
NaN

牛さん wayou

👁️‍🗨️
NaN
View GitHub Profile
@wayou
wayou / filters.txt
Created October 6, 2021 04:08
ublock 屏蔽知乎视频
www.zhihu.com##[class="ZVideoItem-video"]
www.zhihu.com##[class="VideoAnswerPlayer"]
www.zhihu.com##[class="RichText-ZVideoLinkCardContainer"]
Preface 6
Preface to the first edition 8
Chapter 1 - A Tutorial Introduction 9
1.1 Getting Started 9
1.2 Variables and Arithmetic Expressions 11
1.3 The for statement 15
1.4 Symbolic Constants 17
1.5 Character Input and Output 17
1.5.1 File Copying 18
1.5.2 Character Counting 19
@wayou
wayou / emscripten vscode setup.md
Last active August 15, 2024 12:54
setup emscripten for vscode intelli sense

install emscripten

$ brew install emscripten

and setup by following the instruction after the installation.

get the location of emscripten header files

@wayou
wayou / emscripten.sh
Last active June 24, 2019 10:21
using emscripten from docker instead of installing locally
emcc_image="trzeci/emscripten";
if [[ "$(docker images -q $emcc_image:latest 2> /dev/null)" == "" ]]; then
docker pull emcc_image;
fi
alias emcc="docker run --rm -v "$(pwd):/src" $emcc_image emcc";
# test
emcc -v
@wayou
wayou / .npmrc
Last active August 28, 2021 08:20
配置 npm 及相关资源访问国内镜像的 npmrc
# package-lock=false
registry="https://registry.npm.taobao.org"
disturl="https://npm.taobao.org/dist"
nvm_nodejs_org_mirror="http://npm.taobao.org/mirrors/node"
nodejs_org_mirror="http://npm.taobao.org/mirrors/node"
sass_binary_site="http://npm.taobao.org/mirrors/node-sass"
electron_mirror="http://npm.taobao.org/mirrors/electron/"
SQLITE3_BINARY_SITE="http://npm.taobao.org/mirrors/sqlite3"
profiler_binary_host_mirror="http://npm.taobao.org/mirrors/node-inspector/"
node_inspector_cdnurl="https://npm.taobao.org/mirrors/node-inspector"
@wayou
wayou / initial_project.sh
Created March 29, 2019 09:21
quick initial node projects with license, readme, gitignore,etc
npx license mit > LICENSE && npx gitignore node && npx covgen liuwayong@gmail.com && yarn init -y
@wayou
wayou / .yarnrc
Last active December 16, 2023 11:45
配置 yarn 使用国内镜像进行安装的 rc 文件,将此文件放到项目根目录使用
registry "https://registry.npm.taobao.org"
disturl "https://npm.taobao.org/dist"
nvm_nodejs_org_mirror "http://npm.taobao.org/mirrors/node"
NODEJS_ORG_MIRROR "http://npm.taobao.org/mirrors/node"
sass_binary_site "http://npm.taobao.org/mirrors/node-sass"
electron_mirror "http://npm.taobao.org/mirrors/electron/"
SQLITE3_BINARY_SITE "http://npm.taobao.org/mirrors/sqlite3"
profiler_binary_host_mirror "http://npm.taobao.org/mirrors/node-inspector/"
node_inspector_cdnurl "https://npm.taobao.org/mirrors/node-inspector"
selenium_cdnurl "http://npm.taobao.org/mirrors/selenium"
@wayou
wayou / vim_comment_tip.md
Last active January 25, 2019 05:13
comment/uncomment batch lines of code in vim

comment

  • go to the first line you want to comment
  • control + c enter visual mode
  • navigate to the last line you want to comment
  • shift + i enter edit mode
  • type the comment symbol #,// or whatever
  • press ESC twice to exit

uncomment

// ==UserScript==
// @name set video playback rate
// @namespace http://tampermonkey.net/
// @version 0.1
// @description change the playback rate of the video
// @author wayou
// @match *://pan.baidu.com/*
// @match *://www.zealer.com/*
// @grant unsafeWindow
// @grant GM_addStyle
// ==UserScript==
// @name baidu yun 资源链接
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 自动将google搜索结果页面中百度云盘地址变成可点击的链接,如果链接附近有提取码,在点击时自动复制
// @author You
// @match https://www.google.com/search*
// @grant none
// ==/UserScript==