This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (global, factory) { | |
if (typeof define === "function" && define.amd) { | |
define(["@antv/g2"], factory); | |
} else if (typeof exports !== "undefined") { | |
factory(require("@antv/g2")); | |
} else { | |
var mod = { | |
exports: {} | |
}; | |
factory(global.g2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
version: 1.0 | |
domains: | |
- www.yuque.com | |
url_patterns: | |
- www.yuque.com/* | |
timestamp: '2018-07-30T09:44:20Z' | |
id: 5SbQ | |
redirect_url: https://www.yuque.com/ | |
shared_via: StyleURL - (https://styleurl.app) import and export CSS changes from Chrome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import provinces from 'china-division/dist/provinces.json'; | |
import cities from 'china-division/dist/cities.json'; | |
import areas from 'china-division/dist/areas.json'; | |
areas.forEach((area) => { | |
const matchCity = cities.filter(city => city.code === area.cityCode)[0]; | |
if (matchCity) { | |
matchCity.children = matchCity.children || []; | |
matchCity.children.push({ | |
label: area.name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import styles from './Count.module.less'; | |
import React from 'react'; | |
import classnames from 'classnames'; | |
import { Button } from 'antd'; | |
import { COUNT_INCREASE, COUNT_INCREASE_ASYNC, COUNT_DECREASE } from '../../constants/count'; | |
const Count = ({ dispatch, count }) => | |
<div> | |
<div>{count}</div> | |
<Button |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 当前的 Generator | |
var activeGenerator; | |
// 控制工具 | |
function start(generatorFunc) { | |
activeGenerator = generatorFunc(function(data) { | |
activeGenerator.next(data); | |
}); | |
activeGenerator.next(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name AliWay Script. | |
// @version 0.1 | |
// @match http://www.aliway.com/* | |
// @copyright 2012+, You | |
// ==/UserScript== | |
$("div.tpc_content").removeClass("tpc_content").css("padding", "0 15px 20px 15px").css("line-height", "1.5"); | |
document.body.style.webkitUserSelect = "text"; | |
document.body.style.MozUserSelect = "text"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
// save global scope | |
var scope = []; | |
for(var p in window) { | |
scope.push(p); | |
} | |
// code | |
window.a = 1; |