Skip to content

Instantly share code, notes, and snippets.

View ijse's full-sized avatar
🎯
Focusing

Li Yi ijse

🎯
Focusing
View GitHub Profile
@ijse
ijse / newsApiResult.js
Created June 3, 2013 05:02
新闻接口返回数据格式
cyouCallback([
{
"url": "/ty/media/20130415/55113.shtml",
"date": "2013-04-15",
"title": "【优酷】超燃!玩家激情解说桃园竞技场",
"channel":"媒体"
},
{
"url": "/ty/media/20130415/55112.shtml",
"date": "2013-04-15",
@ijse
ijse / directory.js
Last active December 17, 2015 02:49 — forked from danherbert-epam/directory.js
mkdir -p 支持多平台
var fs = require('fs');
var pathSep = require('path').sep;
var Path = require("path");
var directory = module.exports = {};
directory.mkdirSync = function __directory_mkdirSync__(path) {
var dirs = Path.normalize(path).split(pathSep);
var root = "";
@ijse
ijse / jQuery.extend.js
Created May 6, 2013 06:00
Object.extend() implement from jQuery
{
//Object.extend comes from jQuery
extend: function () {
var options, name, src, copy, copyIsArray, clone, target = arguments[0] || {},
i = 1,
length = arguments.length,
deep = false,
toString = Object.prototype.toString,
hasOwn = Object.prototype.hasOwnProperty,
push = Array.prototype.push,
@ijse
ijse / jsextend.js
Created May 25, 2012 03:02
JS:extend function based on Prototype
/**
* Function Extend based on Prototype
* @author ijse
*/
exports.extend = function(sub, superclass) {
var F = function() {};
F.prototype = superclass.prototype;
sub.prototype = new F();
sub.prototype.constructor = sub;
sub.superclass = superclass.prototype;
@ijse
ijse / Notification.js
Created December 1, 2011 08:31
Plugin for Notification of html5 with Chrome
/**
* Notification
* @author: ijse
* @require: Chrome10+
* @params: Same as webkitNotifications.create[HTML]Notification()
* @usage:
* new Notify("http://www.baidu.com").onshow(function() {
* alert("show");
* }).onclose(function() {
* alert("close");