Skip to content

Instantly share code, notes, and snippets.

View Go7hic's full-sized avatar
👓
👖

Go7hic Go7hic

👓
👖
View GitHub Profile
@Go7hic
Go7hic / input.html
Created September 7, 2016 12:46
input type number
<!DOCTYPE html>
<html lang="en">
<head>
<title>input</title>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport"
/>
<style>
@Go7hic
Go7hic / stringrender.js
Last active February 6, 2017 14:03
ES6 字符串模板渲染函数 #tags: ES6
function render (template, options) {
return template.replace(/\{\{\s?(\w+)\s?\}\}/g, (match, variable) => {
return options[variable] || ''
})
}
@Go7hic
Go7hic / utils.js
Last active February 9, 2017 16:41
JS 工具函数集 #tags:jsutils
// 千位数
function commafy(num) {
num = num + '';
var reg = /(-?\d+)(\d{3})/;
while(reg.test(num)) {
num = num.replace(reg, '$1,$2');
}
@Go7hic
Go7hic / javascriptdatastructure.md
Created February 9, 2017 15:30
javascript 数据结构算法 #tags: javascript datastructure

数据结构

数据结构(英语:data structure)是计算机中存储、组织数据的方式。——维基百科

  • 数组(Array)
  • 栈(Stack)
  • 队列(Queue)
  • 链表(Linked List)
  • 集合(Set)
  • 散列表(Hash) 和 字典(Map)
  • 树(Tree)
@Go7hic
Go7hic / regulr.js
Created February 18, 2017 10:03
常用JS正则表达式 #tags: js正则
手机号码:
@Go7hic
Go7hic / #copyjs
Last active August 2, 2017 07:31
JS 深浅拷贝 #tags: 深浅拷贝
```
function deepCopy(p, c) {
    var c = c || {};
    for (var i in p) {
      if (typeof p[i] === 'object') {
        c[i] = (p[i].constructor === Array) ? [] : {};
        deepCopy(p[i], c[i]);
      } else {
         c[i] = p[i];
      }
{"sig":"1e4efb648f274ba44f02cf7d426ce93dca01d4e5dc7ff75cc539d0eecadfcca9d0318e3483db5e069ce00aa0b4852340eae43dbd46b58ee630f8b31580c27c380","msghash":"57578cd28d1ce0c9f4f3f01a51bec57c4a2d5a45a24b5c7393739d0d194477f9"}
@Go7hic
Go7hic / readRemoteFile.js
Created April 10, 2018 03:04 — forked from leizongmin/readRemoteFile.js
Node.js 读取远程文件
var http = require('http');
/**
* 读取远程文件
*
* @param {String} url
* @param {Function} cb
* - {Error} err
* - {Buffer} buf
*/

Keybase proof

I hereby claim:

  • I am dyygtfx on github.
  • I am go7hic (https://keybase.io/go7hic) on keybase.
  • I have a public key whose fingerprint is 093F 4C3C 7FF4 7B9C DC4F D095 8C4E DA4D A4B6 F9F7

To claim this, I am signing this object:

window.companies = [
{
"companyId": 35559,
"companyShortName": "亲宝宝",
"companyFullName": "杭州点望科技有限公司",
"companyLogo": "i/image2/M01/CC/83/CgotOVw1nYCAXKG1AACh6SsABbA834.jpg",
"address": "杭州西湖区紫荆花路2号联合大厦B座3F亲宝宝",
"location": "120.097822,30.266052",
"district": "西湖区",
"financeStage": "C轮",