Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
Working

Jade zjhiphop

:shipit:
Working
View GitHub Profile
@zjhiphop
zjhiphop / results.txt
Created Oct 30, 2011 — forked from JacksonTian/results.txt
各种移动设备的viewport取值
View results.txt
Devices landscape(w/h) portrait(w/h)
HTC g10 533/260 320/473
ipad1 1024/690 768/946
ipad2 1024/690 768/946
Samsung9100 533/237 320/450
Samsung9000 533/239 320/452
LePhone 533/250 320/463
ipod(4.2.1) 480/208 320/356
//以下数据来自支付宝 颂赞
MOROTOLA ME722 320/488 569/239
@zjhiphop
zjhiphop / LICENSE.txt
Created Dec 4, 2011 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
View git_test
var initialize= function () {
this.register();
}
@zjhiphop
zjhiphop / Compose toString problem
Created Aug 14, 2012
Compose toString problem
View Compose toString problem
require(["compose"], function(c) {
var b = c(function() {
}, {toString: function() {
return this.name
}});
var a = c.create(b)
a.name = 'a';
console.log(a.toString())
})
@zjhiphop
zjhiphop / frameworks.md
Created Dec 4, 2012 — forked from yyx990803/frameworks.md
国内互联网公司的前端框架简介
View frameworks.md

百度:Tangram

基本上就是个百度版jQuery,2.0版本使用链式API,更像了。
配套的还有UI库Magic和模版引擎BaiduTemplate(和ejs很像)

腾讯:JX

理念在介绍里面写的很详细,代码清晰,注释丰富,可读性很好,但只有文档没有实例。
比较传统的大块头框架,本质上来说还是一堆工具方法和对象的堆积,提供了很基本的模块化的开发方式,但没有模块间的依赖关系支持。

View index.html
<link href="http://fonts.googleapis.com/css?family=Open+Sans:regular,semibold,italic,italicsemibold|PT+Sans:400,700,400italic,700italic|PT+Serif:400,700,400italic,700italic" rel="stylesheet" />
View git-submodule-rm.sh
#!/bin/bash
function actual_path() {
if [ [ -z "$1" ] -a [ -d $1 ] ]; then
echo $(cd $1 && test `pwd` = `pwd -P`)
return 0
else
return 1
fi
}
View create.js
var BaseObject = {
create: function create() {
var instance = Object.create(this);
instance._construct.apply(instance, arguments);
return instance;
},
extend: function extend(properties, propertyDescriptors) {
propertyDescriptors = propertyDescriptors || {};
View git-bundle
#!/bin/bash
# Issue arbitary git command for each of the sub modules.
# E.g. git-bundle checkout feature/docs
# Check out the feature/docs branch for each of the sub module.
function print_header
{
printf '%.0s-' {1..30} && echo
echo $1
printf '%.0s-' {1..30} && echo
@zjhiphop
zjhiphop / js-extend.js
Last active May 8, 2016
Different type of JS Extend
View js-extend.js
//Simple Prototype extend
var extend = (function () {
var f = function(){};
return function (c, p) {
f.prototype = p.prototype;
c.prototype = new f;
c._super = p.prototype;
c.prototype.constructor = c;
}
})();