This file contains 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
[ | |
{ | |
"date": "2014-06-12", | |
"matches": [ | |
{ | |
"localDatetime": "12 Jun 2014 - 17:00", | |
"matchnum": "Match 1", | |
"group": "Group A", | |
"location": { | |
"stadium": "Arena de Sao Paulo", |
This file contains 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
@mixin with-hash-padding($padding: 200px) { | |
&:before { | |
display: block; | |
content: " "; | |
margin-top: -$padding; | |
height: $padding; | |
visibility: hidden; | |
} | |
} |
This file contains 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
// 打开chrome扩展选项tab | |
var option_url = chrome.extension.getURL('options/index.html'); | |
chrome.tabs.getAllInWindow(null,function(tabs){ | |
var option_tab = tabs.filter(function(t) { return t.url === option_url }); | |
if(option_tab.length){ | |
// 已经打开,直接激活 | |
chrome.tabs.update(option_tab[0].id,{selected:true}); | |
}else{ | |
chrome.tabs.create({url:option_url,selected:true}) | |
} |
This file contains 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
var scripts = document.getElementsByTagName('script'); | |
console.log('a.js',' >>> ',scripts[scripts.length -1].src); | |
console.log(__filename); |
This file contains 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
<html> | |
<head> | |
<title>$.fn.emotion</title> | |
<style type="text/css"> | |
/* comment (笑) */ | |
</style> | |
</head> | |
<body> |
This file contains 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
var $anim = $(document[$.browser.webkit ? 'body' : 'documentElement']); | |
$btn.click(function() { | |
$anim.animate({scrollTop: 0}); | |
return false; | |
}); |
This file contains 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
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script> | |
/* | |
jQuery.proxy和Function.prototype.bind作用一模一样。 |
This file contains 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
$.validator.addMethod("phrange", function (value, element) { | |
if( $(element).attr('placeholder') === value ){ | |
return true; | |
} | |
return $.validator.methods.range.apply(this,arguments); | |
}, ""); | |
$.validator.addMethod("qq", function (value, element) { | |
if( $(element).attr('placeholder') === value ){ | |
return true; |
This file contains 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
var getMaxZ = function(el) { | |
return Math.max.apply(null, $(el||document.body).children().map(function(){ return $(this).css('zIndex')>>>0; }).get()) | |
}; |
This file contains 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
// ==UserScript== | |
// @name MantisEasyAssign | |
// @author sean && ambar | |
// @namespace https://gist.github.com/1141552 | |
// @version 1.3.0 | |
// @description 友好的select,更容易把Bug扔给别人,哈哈 | |
// @include http://mantis.dos123.com/view.php?id=* | |
// @include http://192.168.202.98/view.php?id=* | |
// @include http://mantis.dos123.com/view_all_bug_page.php* | |
// @include http://192.168.202.98/view_all_bug_page.php* |
OlderNewer