Skip to content

Instantly share code, notes, and snippets.

View wangdahoo's full-sized avatar
🎯
Focusing

王大虎 wangdahoo

🎯
Focusing
  • Shanghai
View GitHub Profile
@wangdahoo
wangdahoo / vonic-helloworld.html
Last active February 4, 2017 16:55
Vonic 2 Example - Hello World
<!DOCTYPE html>
<html lang="en">
<head>
<title>Vonic 2 - Hello World</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- ionic css -->
<link href="https://unpkg.com/vonic@2.0.0-alpha.6/dist/ionic/css/ionic.css" rel="stylesheet">
@wangdahoo
wangdahoo / hzgb.html
Created March 4, 2017 06:29
汉真广标
<!DOCTYPE html>
<html lang="en">
<head>
<title>汉真广标</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- webfont -->
<link href='//cdn.webfont.youziku.com/webfonts/nomal/99389/19817/58ba5cc1f629d8128cc4b86b.css' rel='stylesheet' type='text/css' />
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://unpkg.com/vue@2.1.10/dist/vue.min.js"></script>
<script src="https://unpkg.com/lodash@4.17.4/lodash.min.js"></script>
<style>
@wangdahoo
wangdahoo / reset.css
Created March 25, 2017 12:17
Eric Meyer's reset-css
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@wangdahoo
wangdahoo / Vue component module
Created April 10, 2017 05:57 — forked from znck/ Vue component module
Example for `rollup-plugin-vue`
Create a module for vue component.
@wangdahoo
wangdahoo / input.html
Created August 17, 2017 09:13
手机号码输入框
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="http://unpkg.qkcdn.com/lodash@4.17.4/lodash.min.js"></script>
<script src="http://unpkg.qkcdn.com/vue@2.4.2/dist/vue.min.js"></script>
</head>
<body>
@wangdahoo
wangdahoo / call.go
Last active October 12, 2018 12:21
reflect-call
// 反射
package main
import (
"errors"
"reflect"
"fmt"
)
func Call(m map[string]interface{}, name string, params ...interface{}) ([]reflect.Value, error) {
@wangdahoo
wangdahoo / tmux-cheatsheet.markdown
Created March 25, 2019 12:52 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@wangdahoo
wangdahoo / whoisyourdaddy.js
Created June 18, 2019 09:25
字符串转数字
const COUNT = 1000 * 1000 * 10
function run (sum, fn) {
const startTime = Date.now()
for (let i = 0; i < COUNT; i++) {
sum = fn(sum)
}
console.log(`duration: ${Date.now() - startTime}`)
}
@wangdahoo
wangdahoo / rem.html
Created October 2, 2019 07:42
rem script
<script>!function(e,t){function n(){t.body?t.body.style.fontSize=12*o+"px":t.addEventListener("DOMContentLoaded",n)}function d(){var e=i.clientWidth/10;i.style.fontSize=e+"px"}var i=t.documentElement,o=e.devicePixelRatio||1;if(n(),d(),e.addEventListener("resize",d),e.addEventListener("pageshow",function(e){e.persisted&&d()}),o>=2){var a=t.createElement("body"),s=t.createElement("div");s.style.border=".5px solid transparent",a.appendChild(s),i.appendChild(a),1===s.offsetHeight&&i.classList.add("hairlines"),i.removeChild(a)}}(window,document);</script>