Skip to content

Instantly share code, notes, and snippets.

View paddingme's full-sized avatar
🛵
Drifting down a road

PaddingMe paddingme

🛵
Drifting down a road
View GitHub Profile
function get(uri) {
return http(uri,'GET');
}
function post(uri,data) {
if(typeof data === 'object' && !(data instanceof String || (FormData && data instanceof FormData))) {
var params = [];
for(var p in data) {
if(data[p] instanceof Array) {
for(var i = 0; i < data[p].length; i++) {
params.push( encodeURIComponenet(p) + '[]=' + encodeURIComponenet(data[p][i]);
<!DOCTYPE html>
<head>
<title>Stay Standalone</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<script src="stay_standalone.js" type="text/javascript"></script>
</head>
<body>
<ul>
<li><a href="http://google.com/">Remote Link (Google)</a></li>
@paddingme
paddingme / first.js
Last active August 29, 2015 14:08 — forked from sofish/first.js
// 大家写在评论中吧,代码高亮可以这样写:
// ```js
// your code
// ```
// update: Fri Aug 31 08:39:21
// copyright: https://gist.github.com/3549352
// 加个性能测试:http://jsperf.com/get-dom-s-first-element
var util = {};
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
@paddingme
paddingme / carousel.js
Last active August 29, 2015 14:06 — forked from barryvdh/carousel.js

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->
/*
KISSY CSS Reset
理念:清除和重置是紧密不可分的
特色:1.适应中文 2.基于最新主流浏览器
维护:玉伯(lifesinger@gmail.com), 正淳(ragecarrier@gmail.com)
*/
/* 清除内外边距 */
body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
dl, dt, dd, ul, ol, li, /* list elements 列表元素 */