Skip to content

Instantly share code, notes, and snippets.

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

牛さん wayou

👁️‍🗨️
NaN
View GitHub Profile
@wayou
wayou / emscripten vscode setup.md
Last active February 13, 2025 03:49
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

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 / 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"]
@wayou
wayou / autocorrect-esm.js
Created April 15, 2025 05:39
autocorrect-esm.js
const A="https://huacnlee.github.io/autocorrect/assets/autocorrect_bg-46190a73.wasm",C=async(e={},n)=>{let o;if(n.startsWith("data:")){const _=n.replace(/^data:.*?base64,/,"");let r;if(typeof Buffer=="function"&&typeof Buffer.from=="function")r=Buffer.from(_,"base64");else if(typeof atob=="function"){const c=atob(_);r=new Uint8Array(c.length);for(let i=0;i<c.length;i++)r[i]=c.charCodeAt(i)}else throw new Error("Cannot decode base64-encoded data URL");o=await WebAssembly.instantiate(r,e)}else{const _=await fetch(n),r=_.headers.get("Content-Type")||"";if("instantiateStreaming"in WebAssembly&&r.startsWith("application/wasm"))o=await WebAssembly.instantiateStreaming(_,e);else{const c=await _.arrayBuffer();o=await WebAssembly.instantiate(c,e)}}return o.instance.exports};let t;function v(e){t=e}const E=typeof TextDecoder>"u"?(0,module.require)("util").TextDecoder:TextDecoder;let x=new E("utf-8",{ignoreBOM:!0,fatal:!0});x.decode();let b=null;function p(){return(b===null||b.byteLength===0)&&(b=new Uint8Array(t.memory
@wayou
wayou / nvm_lazy_loading_guide.md
Created August 19, 2025 12:44
Fish Shell NVM Lazy Loading Setup Guide

Fish Shell NVM Lazy Loading Setup

Goal

Make nvm lazy load to speed up terminal startup while keeping full functionality.

Changes Made

1. System Default Node.js Setup

Create symlinks to make nvm-installed Node.js v23.7.0 the system default: