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
<?php | |
// Requires "file", "size" and "default" parameters | |
if (!isset($_REQUEST["file"]) || !isset($_REQUEST["size"]) || !isset($_REQUEST["default"])) { | |
die("Expected to find \"file\", \"size\" and \"default\" parameters."); | |
} | |
// URL of file | |
$url = $_REQUEST["file"]; |
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 enter = (mobile ? 'touchstart' : 'mouseenter'), | |
leave = (mobile ? 'touchend' : 'mouseleave'), | |
events = {}; | |
events[enter] = function () { ... } | |
events[leave] = function () { ... } | |
$('selector').on(events); |
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 elements = [el1, el2, elN]; | |
while (elements.length) { | |
elements.shift(); // This is the element | |
} |
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
(function (win) { | |
'use strict'; | |
var doc = win.document, | |
scrollTop, | |
pagination = doc.getElementsByClassName('pagination')[0], | |
loadingPosts = false, | |
xhr = new win.XMLHttpRequest(), | |
page = 1, | |
nextHref = win.location.href + (win.location.pathname === '/' ? '' : '/') + 'page/'; |
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
.reblogr { | |
position: absolute; | |
right: 5px; | |
top: 5px; | |
} | |
.reblogr a { | |
background-color: rgba(0, 0, 0, 0.5); | |
float: left; | |
margin-left: 3px; |
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
/* Hexagon kitty - By @LeaVerou | |
Disappointingly inflexible, but still interesting methinks. | |
*/ | |
.hexagon { | |
display: inline-block; | |
position: relative; | |
width: 200px; | |
height: 200px; | |
transform: scale(1.25,.707) rotate(-45deg); |
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
/** | |
* Konami Code | |
* @example | |
* konami(function () { | |
* alert("easter egg!"); | |
* }); | |
*/ | |
function konami(success) { | |
var keys = '', |
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
// Create the "script" element | |
var script = document.createElement('script'); | |
// Append | |
document.getElementsByTagName('head')[0].appendChild(script); | |
// Delete | |
script.parentNode.removeChild(script); |
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 { | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
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
a { | |
/* iOS: Actions without the gray overlay */ | |
-webkit-tap-highlight-color: rgba(0,0,0,0); | |
/* iOS: Remove the actions panel */ | |
-webkit-touch-callout: none; | |
} |