Skip to content

Instantly share code, notes, and snippets.

View kagawagao's full-sized avatar
🎯
Focusing

Jingsong Gao kagawagao

🎯
Focusing
View GitHub Profile
@kagawagao
kagawagao / error-parsed-chunk.js
Created May 23, 2018 09:46
error-parsed-chunk
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],Array(549).concat([function(t,e,n){var r=n(552).CommonUtil,i=5;function o(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}var a=r.assign({cloneDeep:n(618),filter:n(891),flatten:n(672),groupBy:n(724),indexOf:n(880),isDate:n(878),isEmpty:n(82),isEqualWith:n(876),isFinite:n(875),isNaN:n(874),isNull:n(873),isPlainObject:n(70),lowerFirst:n(872),map:n(723),maxBy:n(871),minBy:n(869),pick:n(607),reduce:n(864),replace:n(862),round:n(861),union:n(859),uniq:n(720),upperCase:n(858),snapEqual:function(t,e){return Math.abs(t-e)<.001},fixedBase:function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))},mix:function(t,e,n,r){return e&&o(t,e),n&&o(t,n),r&&o(t,r),t},inArray:function(t,e){return t.indexOf(e)>=0},wrapBehavior:function(t,e){if(t["_wrap_"+e])return t["_wrap_"+e];var n=function(n){t[e](n)};return t["_wrap_"+e]=n,n},getWrapBehavi
@kagawagao
kagawagao / backup.json
Created April 3, 2017 08:43
stylebot backup
{"wiki.sdp.nd":{"_enabled":true,"_rules":{"div.toc":{"position":"fixed","top":"85px","right":"24px","box-sizing":"border-box","min-height":"500px","max-height":"calc(100% - 170px)","overflow-y":"auto","overflow-x":"hidden","overflow-wrap":"break-word","display":"flex","flex-direction":"column","min-width":"150px","max-width":"500px","border":"1px solid #38adff","z-index":"999","line-height":"1.1","background-color":"rgba(255,255,255, 0.8)"},"div.toc ul":{"margin":"0","padding-left":"10px"},"::-webkit-scrollbar":{"width":"4px","height":"8px"},"::-webkit-scrollbar-thumb":{"background":"rgba(204, 204, 204, 0.6)"},"div.collapsible-nav":{"position":"fixed","bottom":"0","overflow":"auto","top":"0","display":"flex","flex-direction":"column","z-index":"999","padding":"8px"},"#p-logo":{"position":"static"},"span.toctoggle":{"display":"none"}}},"*":{"_enabled":true,"_rules":{}}}
@kagawagao
kagawagao / data.json
Created January 18, 2017 02:41
China GB2260
[
{
"value": "110000",
"label": "北京市",
"children": [
{
"value": "110100",
"label": "市辖区",
"children": [
{
@kagawagao
kagawagao / scroll.vue
Last active November 27, 2016 06:33
scroll
<template lang="html">
<div id="demo">
<div
class="drag-area"
@touchstart="dragstart"
@touchmove.stop.prevent="drag"
@touchend="dragend">
<ul
:class="['list', {animation}]"
:style="style">
@kagawagao
kagawagao / getBinary.js
Last active July 26, 2016 09:46
将由1 2 4 8 等或运算的结果分解
function getBinary (num) {
var n = Math.ceil(Math.sqrt(num))
var codes = []
for (let i = 0; i<= n; i++) {
codes.push(Math.pow(2,i))
}
var res = []
for (let k = codes.length -1; k >= 0; k--) {
if (num >= codes[k]) {
num = num - codes[k]
@kagawagao
kagawagao / auto-deploy.md
Created July 16, 2016 07:06 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->