Skip to content

Instantly share code, notes, and snippets.

View miaozilong's full-sized avatar

miaozilong miaozilong

View GitHub Profile
@miaozilong
miaozilong / websocket2http.html
Created January 23, 2021 17:47
websocket to http
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
// 事件对象
let eventObj = {};
let pubsub = {
sub: (key, fn) => {
/**************************************
* Header Counters in TOC
**************************************/
/* No link underlines in TOC */
.md-toc-inner {
text-decoration: none;
}
.md-toc-content {
@miaozilong
miaozilong / yarn config
Created July 27, 2019 02:11
yarn 设置
yarn config set registry "https://registry.npm.taobao.org"
yarn config set sass_binary_site "https://npm.taobao.org/mirrors/node-sass/"
yarn config set phantomjs_cdnurl "http://cnpmjs.org/downloads"
yarn config set electron_mirror "https://npm.taobao.org/mirrors/electron/"
yarn config set sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/"
yarn config set profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/"
yarn config set chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver"
yarn config set puppeteer_download_host "https://npm.taobao.org/mirrors"
@miaozilong
miaozilong / log_by.lua
Last active July 27, 2019 11:16
nginx响应消息记录方法
local chunk, eof = ngx.arg[1], ngx.arg[2]
local buffered = ngx.ctx.buffered
if not buffered then
buffered = {}
ngx.ctx.buffered = buffered
end
if chunk ~= "" then
buffered[#buffered + 1] = chunk
ngx.arg[1] = nil
end
@miaozilong
miaozilong / Demo.jsx
Created June 28, 2019 16:12
动态加载树
@connect()
class Center extends PureComponent {
state = {
treeData: [
{ title: 'Expand to load', key: '0' },
{ title: 'Expand to load', key: '1' },
{ title: 'Tree Node', key: '2', isLeaf: true },
],
};
import { MenuTheme } from 'antd/es/menu';
export type ContentWidth = 'Fluid' | 'Fixed';
export interface DefaultSettings {
/**
* theme for nav menu
*/
navTheme: MenuTheme;
/**
@miaozilong
miaozilong / select-hack.html
Created May 20, 2019 14:49 — forked from Jimco/select-hack.html
下拉菜单select样式 — 兼容IE6/IE7/IE8/火狐
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>兼容IE6/IE7/IE8/火狐---下拉菜单select样式兼容</title>
<style type="text/css">
body {background-color:#6C6;}
.sel-wrap{width:88px;height:29px;*background:#fff;background:#fff;*border:1px solid #b2b2b2;*padding:4px;*height:20px;}
.sel-inner{*border:0;*position:relative;*height:18px;*overflow:hidden;}
.so-sel{border:1px solid #b2b2b2;padding:4px 3px;font-size:12px;height:30px;width:89px;*width:88px;*margin:-1px;outline:none;}