Skip to content

Instantly share code, notes, and snippets.

View sorrycc's full-sized avatar
🌻
Working on Neovate Code

chencheng (云谦) sorrycc

🌻
Working on Neovate Code
View GitHub Profile
127.0.0.1, yyets.com, *.yyets.com, letvcdn.com, *.letvcdn.com, atatech.org, *.atatech.org, suning.com, *.suning.com, ku6.com, *.ku6.com, donews.com, *.donews.com, goodbabygroup.com, *.goodbabygroup.com, elong.com, *.elong.com, 56img.com, *.56img.com, alibaba.com, *.alibaba.com, lm.licenses.adobe.com, *.lm.licenses.adobe.com, paypalobjects.com, *.paypalobjects.com, acfun.tv, *.acfun.tv, 115img.com, *.115img.com, jandan.net, *.jandan.net, huanqiu.com, *.huanqiu.com, xiami.com, *.xiami.com, weiphone.net, *.weiphone.net, sogou.com, *.sogou.com, yhd.com, *.yhd.com, csdn.net, *.csdn.net, youku.com, *.youku.com, allyes.com, *.allyes.com, 51.la, *.51.la, chinaz.com, *.chinaz.com, highbd.net, *.highbd.net, iciba.com, *.iciba.com, 265.com, *.265.com, 39.net, *.39.net, synacast.com, *.synacast.com, emarbox.com, *.emarbox.com, tgbus.com, *.tgbus.com, zhaopin.com, *.zhaopin.com, chinamobile.com, *.chinamobile.com, lashouimg.com, *.lashouimg.com, gamersky.com, *.gamersky.com, caing.com, *.caing.com, jiathis.com, *.jiathis.
@sorrycc
sorrycc / 0_reuse_code.js
Created February 17, 2016 12:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
# the path where screenshots to save
SS_PATH="/tmp"
# if you want to save them to your desktop, SS_PATH should be "/Users/YOURNAME/Desktop"
# a variable of unix timestamp for screenshot file name
NOW=$(date +%s)
# execute screen capture command, screenshot$NOW.png is the name of file
screencapture -i -r $SS_PATH/[email protected]
@sorrycc
sorrycc / check_local_pkg.js
Created December 30, 2014 09:16
Compare sync pkg's md5.
require('shelljs/global');
var crypto = require('crypto');
var stat = require('fs').statSync;
var join = require('path').join;
var dirname = require('path').dirname;
var readFile = require('fs').readFileSync;
var dir = join(__dirname, '../spmjs.io/data/repository');
cd(dir);
@sorrycc
sorrycc / config.js
Created October 30, 2014 10:02
spm build script
var join = require('path').join;
var DEFAULT_CONFIG = {
// spm 源
"registry": "http://private-spm-url",
// Rename files
// 详见:https://github.com/jeremyruppel/pathmap
"pathmap": null,
@sorrycc
sorrycc / after.js
Created July 25, 2014 08:21
spm-build diff
define("acharts/1.0.0/index-debug", [], function(require, exports, module) {
var acharts = require("acharts/1.0.0/src/chart-debug");
acharts.Util = require("acharts/1.0.0/src/util-debug");
acharts.Canvas = require("acharts/1.0.0/src/canvas-debug");
window.Chart = acharts;
module.exports = acharts;
});
@sorrycc
sorrycc / index.js
Created May 23, 2014 11:05
requirebin sketch
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var moment = require("moment")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
document.body.appendChild(canvas)
/**
* Require the module at `name`.
*
* @param {String} name
* @return {Object} exports
* @api public
*/
function require(name) {
var module = require.modules[name];
/**
* 检测客户端系统中,是否安装了某种字体
*
* 在IE中,通过<object classid>的方式,提取系统中的字体库进行判断
* 非IE中,通过字体宽度与默认字体进行比较
*
* @example
qext.FontDetect.detect(['微软雅黑','Microsoft Yahei'],function(isExist){
//获得html节点
var htmlElm = qing.dom.query('html')[0];
@sorrycc
sorrycc / template.html
Last active August 29, 2015 13:58
anima widget basic template.
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>test delegate</title>
</head>
<body>
<script src="https://a.alipayobjects.com/seajs/seajs/2.2.0/sea.js"></script>