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
$(document).ready(function() { | |
var jsChecked = document.createAttribute('class'); | |
jsChecked.nodeValue = 'js'; | |
document.getElementsByTagName('body')[0].setAttributeNode(jsChecked); | |
}); |
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
.ir { | |
border: 0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
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
[color] | |
ui = true | |
[alias] | |
go = checkout | |
ci = commit -m | |
st = status | |
br = branch | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
type = cat-file -t |
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
<?php | |
// define the path and name of cached file | |
$cachefile = 'cached-files/'.date('M-d-Y').'.php'; | |
// define how long we want to keep the file in seconds. I set mine to 5 hours. | |
$cachetime = 18000; | |
// Check if the cached file is still fresh. If it is, serve it up and exit. | |
if (file_exists($cachefile) && time() - $cachetime < filemtime($cachefile)) { | |
include($cachefile); | |
exit; | |
} |
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
function Each(obj, fn) { | |
if (obj.length) for (var i = 0, ol = obj.length, v = obj[0]; i < ol && fn(v, i) !== false; v = obj[++i]); | |
else for (var p in obj) if (fn(obj[p], p) === false) break; | |
}; |
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
@media (min-width: 701px) { | |
.dashboard { | |
position: fixed; | |
} | |
} | |
@media (max-width: 900px) and (min-width: 701px) { | |
.wrapper { | |
width: 100%; | |
padding: 54px 0px 0px 0px; |
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
function addGlobalStyle(css) { | |
var head, style; | |
head = document.getElementsByTagName('head')[0]; | |
if (!head) { return; } | |
style = document.createElement('style'); | |
style.type = 'text/css'; | |
style.innerHTML = css; | |
head.appendChild(style); | |
} |
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
DOMTokenList.prototype.addMany = function(classes) { | |
var classes = classes.split(' '); | |
for (var i = classes.length - 1; i >= 0; i--) { | |
this.add(classes[i]); | |
}; | |
}; | |
DOMTokenList.prototype.removeMany = function(classes) { | |
var classes = classes.split(' '); | |
for (var i = classes.length - 1; i >= 0; i--) { |
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
EventTarget.prototype.addAnimationListener = function(type, listener, useCapture, wantsUntrusted) { | |
//vendors[0][vendorIndex] = vendor-prefixes + vendors[1][vendorIndex] = vendorwrittenInCamelCase | |
//[[w3c, ff, webkit, Opera, IE],[...]] | |
var vendors = [['', '', 'webkit', 'o', 'MS'],[false, false, true, false, true]]; | |
var prefix = 'Animation'; | |
var animationTypes = ['Start', 'Iteration', 'End']; | |
var animationType = false; | |
for(var i = animationTypes.length - 1; (i >= 0) && !animationType; i--) { | |
animationType = (type.toLowerCase() === animationTypes[i].toLowerCase()) ? i : false; | |
} |
OlderNewer