Skip to content

Instantly share code, notes, and snippets.

View gaomeng1900's full-sized avatar
🎩
mua

Simon gaomeng1900

🎩
mua
View GitHub Profile
@gaomeng1900
gaomeng1900 / filesystem_api_test.js
Last active April 16, 2019 08:32
Chrome 文件系统 接口 试验
// https://developers.google.com/web/updates/2017/08/estimating-available-storage-space
const storageManager = navigator.storage
// 当前空间使用率
window.log = () => {
storageManager
.estimate()
.then(estimate =>
console.log(
@gaomeng1900
gaomeng1900 / llvm-wasm.sh
Last active November 17, 2022 16:35
使用LLVM编译wasm
# 编译使用LLVM的实验性WASM编译器
# 编译支持
# [Cloudflare Workers WebAssembly Demo](http://www.joyk.com/dig/detail/1538467210844002)
# [lldでwasmをリンクするまで](https://qiita.com/chikoski/items/41853dfb2afdec52e7d1)
# [Using LLVM from Rust to generate WebAssembly binaries](https://medium.com/@jayphelps/using-llvm-from-rust-to-generate-webassembly-93e8c193fdb4)
# [Notes on working with C and WebAssembly](https://aransentin.github.io/cwasm/)
# llvm编译文档
# https://clang.llvm.org/get_started.html
@gaomeng1900
gaomeng1900 / addEventListener-polyfill.js
Created April 22, 2016 17:13 — forked from eirikbacker/addEventListener-polyfill.js
addEventListener polyfill for IE6+
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}