Skip to content

Instantly share code, notes, and snippets.

View ibeeger's full-sized avatar
🐮
coding

邯 xiaohan.cui ibeeger

🐮
coding
View GitHub Profile
@ibeeger
ibeeger / webpack.config.js
Last active July 22, 2020 05:13
webpack.config.js multi-compiler Sequential execution
/**
webpack.config.js
**/
const webpack = require('webpack');
const env = process.env.NODE_ENV;
const configs = [{
name:"one",
entry:{
},
@ibeeger
ibeeger / webworker.md
Created April 28, 2018 08:29
webworker 注意事项

###webworker 注意事项 在worker线程中,可以获得下列对象

  1. navigator对象
    
  2. location对象,只读
    
  3. XMLHttpRequest对象
    
  4. setTimeout/setInterval方法

@ibeeger
ibeeger / bigpipe注意事项.md
Last active February 7, 2019 11:31
bigpipe 一些注意事项
@ibeeger
ibeeger / htmltopdf.md
Last active May 25, 2018 06:15
html 生成pdf 功能分析

html 生成 pdf

 未完 后面分析不同方案有略胜

--unsafely-treat-insecure-origin-as-secure=http://domain

忽略https校验,在业务中有时候会获取用户的摄像头、话筒等权限 也就是getUserMedia api,因为该权限获取在 47以上的版本就必须是https下才能获取,可能在开发过程中如果不知道怎么配置https 证书,可以用这个参数 ,另外方式就是 localhost 会自动忽略

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --unsafely-treat-insecure-origin-as-secure=http://xxxxx.com --user-data-dir=/tmp

msgpack5

  • nodeserver 部分

安装: npm install msgpack5

  • server代码 基于express 4.x

var msgpack = require("msgpack5")();

@ibeeger
ibeeger / weixinpay.md
Last active May 25, 2018 09:28
微信支付总结

微信公众号支付

准备工作

  • appid 公众号id
  • mch_id 商户号 公众号申请微信支付成功后 会有个商户号
  • key 密钥 申请成功后会收到邮件 会带着密钥 用于签名

配置环境:

  • 配置支付目录(开发,生产环境)
@ibeeger
ibeeger / regs.md
Created May 25, 2018 11:34
正则表达式规则

元字符

  • .*表示任意数量的不包含换行的字符
  • . 匹配除换行符以外的任意字符
  • \w 匹配字母或数字或下划线或汉字 (不包含标点符号等特殊符号)
  • \s 匹配任意的空白符
  • \d 匹配数字
  • \b 匹配单词的开始或结束 和 ^有些类似
  • ^ $ 匹配开始和结束
  • (|)或
@ibeeger
ibeeger / tesseract.md
Created May 25, 2018 11:37
ocr 文字识别
@ibeeger
ibeeger / es6import.md
Last active May 25, 2018 11:38
es6import

export

基本的两种用法:

export function foo() {
// ..
}
export var awesome = 42;
var bar = [1,2,3];