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
/*
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:
This post examines the features of [R Markdown](http://www.rstudio.org/docs/authoring/using_markdown)
using [knitr](http://yihui.name/knitr/) in Rstudio 0.96.
This combination of tools provides an exciting improvement in usability for
[reproducible analysis](http://stats.stackexchange.com/a/15006/183).
Specifically, this post
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96;
(2) provides a basic example of producing console output and plots using R Markdown;
(3) highlights several code chunk options such as caching and controlling how input and output is displayed;
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and
(5) discusses the implications of R Markdown.
@zjhiphop
zjhiphop / chrome.md
Created August 15, 2014 03:44 — forked from 0xjjpa/chrome.md

#Introduction

Developing Chrome Extensions is REALLY fun if you are a Front End engineer. If you, however, struggle with visualizing the architecture of an application, then developing a Chrome Extension is going to bite your butt multiple times due the amount of excessive components the extension works with. Here are some pointers in how to start, what problems I encounter and how to avoid them.

Note: I'm not covering chrome package apps, which although similar, work in a different way. I also won't cover the page options api neither the new brand event pages. What I explain covers most basic chrome applications and should be enough to get you started.

Table of Contents

  1. Understand the Chrome Architecture
  2. Understand the Tabs-Extension Relationship
  3. Picking the right interface for the job
@zjhiphop
zjhiphop / programme jokes
Last active August 29, 2015 14:05
programme jokes
def protecter():
sb = []
sb.append(" _ooOoo_\n")
sb.append(" o8888888o\n")
sb.append(" 88\" . \"88\n")
sb.append(" (| -_- |)\n")
sb.append(" O\\ = /O\n")
sb.append(" ____/`---'\\____\n")
sb.append(" .' \\\\| |// `.\n")
sb.append(" / \\\\||| : |||// \\ \n")
@zjhiphop
zjhiphop / uri.js
Last active August 29, 2015 14:07 — forked from jlong/uri.js
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@zjhiphop
zjhiphop / jquery-each-context.js
Last active August 29, 2015 14:09
jquery-each-context issue
function test() {
var a = 1;
$('span').each(function() {
this.innerHTML = a; // 'a' can not accessed in this scope
});
}
@zjhiphop
zjhiphop / callstack.js
Created November 21, 2014 07:04
callstack.js
/*
* 打印 JavaScript 函数调用堆栈
*/
function printCallStack() {
var i = 0;
var fun = arguments.callee;
do {
fun = fun.arguments.callee.caller;
console.log(++i + ': ' + fun);
} while (fun);
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person