Skip to content

Instantly share code, notes, and snippets.

View zjhiphop's full-sized avatar
🎯
Focusing

newboy zjhiphop

🎯
Focusing
  • cloud-tea
  • USA
View GitHub Profile
@zjhiphop
zjhiphop / results.txt
Created October 30, 2011 03:17 — forked from JacksonTian/results.txt
各种移动设备的viewport取值
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 December 4, 2011 07:09 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
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
@zjhiphop
zjhiphop / git_test
Created February 13, 2012 09:09
git_test
var initialize= function () {
this.register();
}
@zjhiphop
zjhiphop / Compose toString problem
Created August 14, 2012 10:18
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 December 4, 2012 05:55 — forked from yyx990803/frameworks.md
国内互联网公司的前端框架简介

百度:Tangram

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

腾讯:JX

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

@zjhiphop
zjhiphop / index.html
Created March 22, 2013 09:39
htmltest
<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" />
#!/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
}
var BaseObject = {
create: function create() {
var instance = Object.create(this);
instance._construct.apply(instance, arguments);
return instance;
},
extend: function extend(properties, propertyDescriptors) {
propertyDescriptors = propertyDescriptors || {};
@zjhiphop
zjhiphop / git-bundle
Last active December 25, 2015 14:19 — forked from garryyao/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 10:15
Different type of JS Extend
//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;
}
})();