Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

e.e.p coolicer

Block or report user

Report or block coolicer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@coolicer
coolicer / gist:2020975
Created Mar 12, 2012
HTML : Starting Template
View gist:2020975
<!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>
@coolicer
coolicer / gist:2020990
Created Mar 12, 2012 — forked from padolsey/gist:527683
Javascript : Detect IE
View gist:2020990
// ----------------------------------------------------------
// 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) {}
@coolicer
coolicer / gist:2042636
Created Mar 15, 2012
HTML : ie and NONEIE
View gist:2042636
<!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">
@coolicer
coolicer / gist:2426306
Created Apr 20, 2012
Javascript : compatPositionFixed
View gist:2426306
//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';
});
@coolicer
coolicer / gist:3051241
Created Jul 5, 2012
Javascript : Array distinct
View gist:3051241
/**
* 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 = [];
View Github
--------------------------------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
@coolicer
coolicer / favicon-interceptor.js
Created Nov 29, 2012 — forked from kentbrew/favicon-interceptor.js
How to short-circuit those annoying favicon requests in node.js
View favicon-interceptor.js
// 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
View Default (Windows).sublime-keymap
[
{ "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}
View reset.css
/*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;}
View Demo.html
<!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>
You can’t perform that action at this time.