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 / frameworks.md
Created December 4, 2012 05:55 — forked from yyx990803/frameworks.md
国内互联网公司的前端框架简介

百度:Tangram

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

腾讯:JX

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

#!/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
/*
Infinite List View
creates <ul> with triggers for infinite scrolling
@author Kevin Jantzer, Blacktone Audio Inc.
@since 2012-11-06
USE - listen for:

##Chrome Packaged Apps

Introduction

Introduced at Google I/O 2012, Chrome packaged apps are a new way to develop apps that are running 'natively' within Chrome on the desktop as well as on Chrome mobile in the near future. I'm currently in the middle of a project where I develop a Chrome packaged app and in this article I would like to share my experience with the development of packaged apps.

Please note: This article should give you a basic insight of topics that I think are helpful to know for developing packaged apps. Furthermore I will give links to each topic, so you can dive deeper into that specific topic if you want to. It's not the goal of this article to act as a complete introduction to Chrome packaged apps, for a much more detailed overview of packaged apps development, please look at the official packaged app documentation.

What are Chrome Packaged Apps

Chrome packaged apps are applic

@zjhiphop
zjhiphop / log.R
Created August 6, 2014 02:15 — forked from mollietaylor/log.R
library(ggplot2)
library(scales)
# load data:
log <- data.frame(Date = c("2013/05/25","2013/05/28","2013/05/31","2013/06/01","2013/06/02","2013/06/05","2013/06/07"),
Quantity = c(9,1,15,4,5,17,18))
log
str(log)
# convert date variable from factor to date format: