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
sudo apt-get update | |
sudo apt-get install libfreetype6 libfreetype6-dev libfontconfig | |
# /etc/apt/sources.list should contain these: | |
# deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse | |
# deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse | |
sudo echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections |
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
<h1>Demo code for "Extreme JavaScript Performance" @ JSConf.eu</h1> | |
<script> | |
var benchmark = function(m,i){ | |
var d1 = new Date, d2, r; | |
while(i--) r = m(); | |
d2 = new Date; | |
console.log(d2.getTime()-d1.getTime()); | |
// if(r) console.log(r); | |
} |
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( | |
a, // a object holding test functions | |
b, // a logging function, taking multiple arguments | |
c, // placeholder | |
d, // placeholder | |
e, // placeholder | |
f // placeholder | |
){ | |
c = d = e = 0; // initialize asserts, failures and exception counts to 0 | |
for ( // iterate |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- from https://wiki.ubuntu.com/Fonts --> | |
<!-- | |
.fonts.conf | |
release 6.3.23 | |
Licensed under GNU GPL | |
================================ |
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
curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H 'Accept: application/vnd.github.v3.raw' -O -L https://api.github.com/repos/owner/repo/contents/path |
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
<style> | |
div { | |
width: 300px; | |
height: 400px; | |
position: absolute; | |
left:50%; | |
margin-left:-150px; | |
background: url('data:image/jpg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwcIBwoICAoOCQgJDhENCgoNERQQEBEQEBQTDxEQEBEPExMXFxkXFxMeHiAgHh4sKysrLDExMTExMTExMTH/2wBDAQsJCQsMCw0LCw0RDg4OERQODg4OFBgQEBEQEBgeFhMTExMWHhsdGRkZHRshIR4eISEpKSgpKTExMTExMTExMTH/wgARCAGQASwDASIAAhEBAxEB/8QAHAAAAQUBAQEAAAAAAAAAAAAAAgABAwQFBgcI/9oACAEBAAAAAOWseh5mtrV+a2YfHx6R9e1q95keZh6k1Dr8jaBpHhpQbar+d+N6fs9Lyj2rVo4tPyU+ty9frS7LC81i9hyanWQ7NWhPJNh3NpNX+YpvRO48f77aHl280i6OK9tTelZ/ktT2vmtDeySqRX2t40NyHEi5el1Hp3kk/U4HPXcbC2H6Krpeory2v6zz1vQ4avqWd/K6nnumnzA1/n3k+m9h8k7Opg0rk8xz2LQ2npgnnDOkt3NqDo6u2uZ6WDw2C76TxudZ2LTNGTPLZjTysDSEVerVt6G/rLkdDguMS9gwpSEAJ3mKLU1sR7xxwwnIE8Vatr9Q+blcnyVOafT39OOuSFHo6Fis19sm1Ll1IbW7chxqXZzhy2dy5ZFuxhUrF+7pWdEbG7rV5U+VoAqFeVuZ5rB6j2B8znsKGWply6urJmZehVw6TBLoa2pl2JgJp7efhWbNj06HDwavnlIt+1asSyyS2JZ5Yq0YWqFmUHJDXpxw2PUaXLZtrzS1cFWJppZJCc3JE5IhdOKrVYoNnu+doNhcoG5Zwb1iaQzMykYk5sTIkLU69Wv0t6tz2vgYMW72nn |
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 href="javascript:$('#footer,#impact_legend,#caption,.pagehead,#header').hide(),$('#main').css({background:'#fff'}),$('#impact_graph').css({overflow:'visible',border:0,margin:0,padding:0,width:'auto'}),$('.site').css({width:'auto',margin:'0'})">GH impact graph whole page</a> |
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 escapeHTML(s,r){r='replace';return s[r](/&/g,'&')[r](/>/g,'>')[r](/</g,'<')} |
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 isRetina(){ | |
return (('devicePixelRatio' in window && devicePixelRatio > 1) || | |
('matchMedia' in window && matchMedia("(min-resolution:144dpi)").matches)) | |
} |
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
<script> | |
document.write('<script src=' + | |
('__proto__' in {} ? 'zepto' : 'jquery') + | |
'.js><\/script>') | |
</script> |
NewerOlder