Skip to content

Instantly share code, notes, and snippets.

Avatar
🥥
Everything is possible

Godfery hiyangguo

🥥
Everything is possible
View GitHub Profile
@hiyangguo
hiyangguo / git-cheat-sheet.md
Last active Apr 24, 2020
Git cheat sheet.
View git-cheat-sheet.md
  1. Delete mutiple branch
git branch -D `git branch --list '3.2.*'`
  1. Apply the changes introduced by some existing commits
# one
git cherry-pick 88ce01c
# mutiples
@hiyangguo
hiyangguo / HtmlWebpackHandleCssInjectPlugin.js
Created Apr 20, 2018
HtmlWebpack插件处理 css 注入
View HtmlWebpackHandleCssInjectPlugin.js
class HtmlWebpackHandleCssInjectPlugin {
constructor(options = {}) {
this.options = options;
}
apply(compiler) {
const handleHtmlWebpackPluginAfterHtmlProcessing = (data) => {
const { filter } = this.options;
if (!filter) {
@hiyangguo
hiyangguo / ie67891011-css-hacks.txt
Last active Oct 21, 2020 — forked from vidaaudrey/ie67891011-css-hacks.txt
IE && Edge CSS hacks - IE6, 7, 8, 9, 10, 11,Edge
View ie67891011-css-hacks.txt
IE6 Only
==================
_selector {...}
IE6 & IE7
==================
*html or { _property: }
IE7 Only
==================
@hiyangguo
hiyangguo / syncToGhPages.bash
Last active Mar 19, 2018
手动同步 gh-pages
View syncToGhPages.bash
#!/usr/bin/env bash
# 进入目录
cd dir
git checkout --orphan new
# 删除原有文件
git reset -- .
git clean -df
# 将资源文件复制到此目录
cp -a * ./
git add .
View getDocumentHeight.js
function documentHeight() {
return Math.max(
document.documentElement.clientHeight,
document.body.scrollHeight,
document.documentElement.scrollHeight,
document.body.offsetHeight,
document.documentElement.offsetHeight
);
}
View 计算数组的和.js
/**
* Created by Godfery on 2016/12/8.
*/
/**
* Created by Godfery on 2016/12/7.
*/
var a = [['bj', 1, 'sh', 2, 'wh', 3], ['gz', 4, 'bj', 5], ['sh', 6], ['sh', 5]];
/**
* 获取数组聚合
* @param array
@hiyangguo
hiyangguo / sankey-config.js
Created Oct 12, 2016
echarts sankey config
View sankey-config.js
option = {
"title": {
"x": "center",
"y": "20",
"textStyle": {
"color": "#999",
"fontWeight": "100"
},
"text": "来源分析"
},
@hiyangguo
hiyangguo / config.md
Created Oct 12, 2016
echarts 3.x 地图问题配置
View config.md
option={
    "color": [
        "#fe8463",
        "#9bca63",
        "#fad860",
        "#60c0dd",
        "#0084c6",
        "#d7504b",
        "#c6e579",
@hiyangguo
hiyangguo / parseTreeObjToLine.js
Last active Sep 23, 2016
parse {a:{b:1}} to {a.b:1}
View parseTreeObjToLine.js
var test = {
id: 1,
user: {
role: [1, 2, 3, 4],
userGroup: {
id: 1
},
name: {
first: "foo",
last: "bar"