create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
/* | |
* 频率控制 返回函数连续调用时,action 执行频率限定为 次 / delay | |
* @param delay {number} 延迟时间,单位毫秒 | |
* @param action {function} 请求关联函数,实际应用需要调用的函数 | |
* @param tail? {bool} 是否在尾部用定时器补齐调用 | |
* @return {function} 返回客户调用函数 | |
*/ | |
var throttle = function(delay,action,tail,debounce) { | |
var now = Date.now, last_call = 0, last_exec = 0, timer = null, curr, diff, | |
ctx, args, exec = function() { |
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
// MIT license | |
(function() { | |
var lastTime = 0; | |
var vendors = ['ms', 'moz', 'webkit', 'o']; |
# Mac OS X 中 Terminal 下 Bash 提示中显示 git 当前分支和状态 | |
# hostname:directory[branch-name] username$ # 干净的工作目录 | |
# hostname:directory[branch-name*] username$ # 不干净的工作目录 | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} |
$(function () { | |
"use strict"; | |
// for better performance - to avoid searching in DOM | |
var content = $('#content'); | |
var input = $('#input'); | |
var status = $('#status'); | |
// my color assigned by the server | |
var myColor = false; |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
</head> | |
<body> | |
<p style="font-weight:bold" id="debug"></p> | |
<textarea style="font-size:15px;"></textarea> | |
<script> |
img.grayscale.disabled { | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'1 0 0 0 0, 0 1 0 0 0, 0 0 1 0 0, 0 0 0 1 0\'/></filter></svg>#grayscale"); | |
-webkit-filter: grayscale(0%); | |
} |
<?php | |
/** | |
* Reads the requested portion of a file and sends its contents to the client with the appropriate headers. | |
* | |
* This HTTP_RANGE compatible read file function is necessary for allowing streaming media to be skipped around in. | |
* | |
* @param string $location | |
* @param string $filename | |
* @param string $mimeType | |
* @return void |