Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

偏右 afc163

Block or report user

Report or block afc163

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View init.coffee
# 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 ->
@afc163
afc163 / Stylefile.yml
Created Jul 30, 2018
Customizations for www.yuque.com via StyleURL.
View Stylefile.yml
---
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
@afc163
afc163 / cascader-address-options.js
Last active May 16, 2019
Address options for antd cascader
View cascader-address-options.js
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,
View Count.jsx
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
View async.js
// 当前的 Generator
var activeGenerator;
// 控制工具
function start(generatorFunc) {
activeGenerator = generatorFunc(function(data) {
activeGenerator.next(data);
});
activeGenerator.next();
}
View aliway_script
// ==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";
@afc163
afc163 / glovar
Last active Dec 21, 2015
Find the new global variable.
View glovar
(function() {
// save global scope
var scope = [];
for(var p in window) {
scope.push(p);
}
// code
window.a = 1;
You can’t perform that action at this time.