View gist:9476733
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 |
View gist:5489174
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 |
View gist:5329c625888fa1065b33
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 |
View gist:1182372
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> |
View escapeHTML.js
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,'<')} |
View gist:3161015
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)) | |
} |
View gist:2282429
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> |
View gist:3733875
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> | |
.fade-right { | |
-webkit-mask-image: -webkit-gradient(linear, left top, right top, from(rgba(0,0,0,1)), color-stop(0.75, rgba(0,0,0,1)), to(rgba(0,0,0,0))); | |
mask: url(#fade_right_svg_mask); | |
} | |
#mask_demo { | |
background: #d0d0d0; | |
height: 100px; | |
width: 500px; | |
padding: 10px; |
View extreme.html
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); | |
} |
View gist:3906580
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
position: relative; | |
display: block; | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
width: 100%; | |
height: 50px; | |
border-radius: 0px; | |
border-bottom-right-radius: 10px; |
NewerOlder