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
# use `basename [suffix]` to do clever multiple renaming | |
for file in *.html.pdf; do \ | |
mv "$file" "`basename $file .html.pdf`.pdf"; | |
done | |
# remove "from" metadata from files on OS X | |
xattr -d "com.apple.metadata:kMDItemWhereFroms" file | |
# remove "quarantine" metadata from files on OS X | |
xattr -d "com.apple.quarantine" 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
javascript:void (function(){[].forEach.call(document.querySelectorAll("link[rel=stylesheet][href]"),function(b){var a=b.href.replace(/(&|\??)reload=\d+/,"");b.href=a+(a.indexOf("?")>=0?"&":"?")+"reload="+(new Date().valueOf())})})(); |
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
javascript:void (function(){var c=document.getElementsByTagName("link");for(var d=0,a=c.length;d<a;d++){if(c[d].rel.toLowerCase().indexOf("stylesheet")>=0&&c[d].href){var b=c[d].href.replace(/(&|\??)reload=\d+/,"");c[d].href=b+(b.indexOf("?")>=0?"&":"?")+"reload="+(new Date().valueOf())}}})(); |
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
javascript:void(navigator.geolocation.getCurrentPosition(function(p){ | |
var f=document.forms[0], | |
c=p.coords; | |
f.q.value=c.latitude+','+c.longitude; | |
f.submit() | |
})()) |
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
# mind the lowercase "on" | |
RewriteEngine on | |
# match all non existing file on the filesystem | |
RewriteCond %{REQUEST_FILENAME} !-f | |
# reroute everything that matches through index.php with `url` as the querystring | |
RewriteRule (.*) index.php?url=$1 |
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
javascript:void(function() { | |
document.querySelector("meta[name=viewport]").setAttribute("content", "width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=1"); | |
})(); |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Inline SVG fallback</title> | |
<script> | |
var div = document.createElement("div"); | |
div.innerHTML = "<svg/>"; | |
document.documentElement.className = (!!div.firstChild && div.firstChild.namespaceURI == "http://www.w3.org/2000/svg" ? "inline-svg" : "no-inline-svg"); | |
document.createElement("svg"); |
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() { | |
var div = document.createElement("div"); | |
var style = document.createElement("style"); | |
div.id = "d"; | |
style.innerHTML = "#d{position:absolute;left:-999px}#d:before{content:'x';}"; | |
document.documentElement.appendChild(div); | |
document.documentElement.appendChild(style); | |
if (div.clientWidth > 0) | |
document.documentElement.className += " generated-content"; | |
document.documentElement.removeChild(div); |
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 hasTransitions = (function() { | |
var propNames = ["transition", "MozTransition", "webkitTransition", "OTransition", "msTransition"]; | |
var i = 0; | |
var length = propNames.length; | |
for (; i < length; i++) { | |
if (typeof document.documentElement.style[propNames[i]] === "string") return true; | |
} | |
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
var hasAnimations = (function() { | |
var propNames = ["animationName", "MozAnimationName", "webkitAnimationName", "msAnimationName"]; | |
var i = 0; | |
var length = propNames.length; | |
for (; i < length; i++) { | |
if (typeof document.documentElement.style[propNames[i]] === "string") return true; | |
} | |
return false; | |
}()); |