Skip to content

Instantly share code, notes, and snippets.

View otakustay's full-sized avatar

Gray Zhang otakustay

  • Long lives alien!
  • Shanghai China
View GitHub Profile
@otakustay
otakustay / RegionChart.js
Created July 30, 2014 05:58
for jscs test
/**
* ADM 2.0
* Copyright 2014 Baidu Inc. All rights reserved.
*
* @ignore
* @file 地域地图控件
* @author lixiang(lixiang05@baidu.com)
*/
define(
@otakustay
otakustay / private-names.js
Last active August 29, 2015 14:05
private property solution
define(function (require) {
// 参考http://wiki.ecmascript.org/doku.php?id=harmony:private_name_objects
// 在不支持private names的现在,使用字符串来表示,日后能很方便地切换成private names
var names = {
handleSubmit: '_handleSubmit',
doValidate: '_doValidate'
};
var exports = {};
@otakustay
otakustay / RichSelector.js
Created September 26, 2014 12:05
Extern search
exports.search = function () {
var event = {
filterData: []
};
event = this.fire('search', event);
if (!event.preventDefault()) {
// 如果没有外部提供搜索条件,就自个儿玩
if (this.searchBox) {
var defaultFilter = {
value: this.getChild('search-box').getValue()
/**
* SSP Account
* Copyright 2013 Baidu Inc. All rights reserved.
*
* @ignore
* @file 二级帐号结构
* @author otakustay
*/
define(
function (require) {
@otakustay
otakustay / kpi-2015a.md
Last active September 6, 2015 12:22
2015A KPI

性能监控

目标

重点对系统启动时间进行监控并获得数据的反馈,以支持构建和启动性能的优化。

该产出同时可应用于DSP端。

子目标

@otakustay
otakustay / ui.md
Created August 21, 2015 06:35
Next UI

明确需求

模板代换

控件的内容本身是一个模板片断,也可以进一步细分为多个小模板片断

每一个模板片断是可被重写的

@otakustay
otakustay / surge.conf
Created October 26, 2015 07:33 — forked from icodesign/surge.conf
surge.conf
[General]
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
loglevel = notify
[Proxy]
Proxy = custom
[Rule]
@otakustay
otakustay / plan-list.json
Last active November 16, 2015 09:20
interface declaration
"requestSchema": {
"protocol": "http",
"args": {
"pageSize": {
"type": "number",
"description": "页码",
"requried": false,
"defaultValue": 1
},
"keyword": {
@otakustay
otakustay / enum.js
Created October 18, 2013 16:37
javascript enum type
/**
* ADM 2.0
* Copyright 2013 Baidu Inc. All rights reserved.
*
* @file 常量枚举类
* @author wangyaqiong(catkin2009@gmail.com)
* @date $DATE$
*/
define(
function () {
@otakustay
otakustay / Dialog.js
Last active December 28, 2015 13:13
yuri demo
import {Engine} form './Engine';
import {tpl} from 'text!./tpl/dialog.tpl';
let engine = new Engine('dialog');
engine.compile(tpl);
export default class Dialog extends Control {
constructor(...args) {
super(...args);