This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<!--[if lt IE 7 ]> <html dir="ltr" class="ie6"> <![endif]--> | |
<!--[if IE 7 ]> <html dir="ltr" class="ie7"> <![endif]--> | |
<!--[if IE 8 ]> <html dir="ltr" class="ie8"> <![endif]--> | |
<!--[if IE 9 ]> <html dir="ltr" class="ie9"> <![endif]--> | |
<!--[if (gt IE 9)|!(IE)]><!--> | |
<html dir="ltr"> | |
<!--<![endif]--> | |
<head> | |
<meta charset="UTF-8"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Fixed IE6 Position Fixed | |
(function(){ | |
if(/MSIE 6/i.test(navigation.userAgent)) { | |
function compatPositionFixed(node) { | |
var top = 150; | |
node.style.position = "absolute"; | |
node.style.top = top + document.documentElement.scrollTop + 'px'; | |
window.attachEvent('onscroll',function(){ | |
node.style.top = top + document.documentElement.scrollTop + 'px'; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Array distinct | |
* @param {Array} Array | |
* @return {Aaary} Return a new array without the same item | |
*/ | |
var distinct = function(arr){ | |
var i = 0, | |
l = arr.length, | |
v,t,o = {},n = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------Github Help-------------------------- | |
0、Linux(windows跳过) | |
$ cd ~/.ssh //检查计算机ssh密钥 | |
如果没有提示:No such file or directory 说明你不是第一次使用git,执行下面的操作,清理原有ssh密钥 | |
$ ls | |
config id_rsa id_rsa.pub known_hosts | |
$ mkdir key_backup | |
$ cp id_rsa* key_backup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// early experiments with node had mysterious double requests | |
// turned out these were for the stoopid favicon | |
// here's how to short-circuit those requests | |
// and stop seeing 404 errors in your client console | |
var http = require('http'); | |
http.createServer(function (q, r) { | |
// control for favicon |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["f12"], "command": "reindent"}, | |
{ "keys": ["ctrl+alt+n"], "command": "new_snippet"}, | |
{ "keys" : ["n","n"], "command": "advanced_new_file", | |
"context":[{"key": "setting.command_mode","operand": true}]}, | |
{ "keys":["j","j"], "command": "exit_insert_mode", | |
"context":[ | |
{ "key": "setting.command_mode", "operand": false}, | |
{ "key": "setting.is_widget", "operand": false} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Reset*/ | |
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td{margin:0;padding:0;}body,button,input,select,textarea{font:12px/1.5 tahoma,arial,\5b8b\4f53;} | |
h1,h2,h3,h4,h5,h6{font-size:100%;} | |
address,cite,dfn,em,var{font-style:normal;}code,kbd,pre,samp{font-family:courier new,courier,monospace;} | |
small{font-size:12px;} | |
ul,ol{list-style:none;} | |
a{text-decoration:none;} | |
a:hover{text-decoration:underline;} | |
sup{vertical-align:text-top;} | |
sub{vertical-align:text-bottom;} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<link rel="stylesheet" href="http://necolas.github.com/normalize.css/1.1.0/normalize.css"> | |
</head> | |
<body> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> |
OlderNewer