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
<table> | |
<tr> | |
<td>1</td> | |
<td>2</td> | |
<td>3</td> | |
</tr> | |
</table> |
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
body { | |
counter-reset: characters; | |
} | |
input:checked { | |
counter-increment: characters; | |
} | |
.total::after { | |
content: counter(characters); |
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 trackOutboundClick(e) { | |
var $link = $(e.currentTarget); | |
var url = $link.attr('href'); | |
ga('send', 'event', 'outbound', 'click', url, { | |
'hitCallback': function() { | |
document.location = url; | |
} | |
}); | |
} |
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
$('.basket').find('.egg').addBack() | |
.show() | |
.addClass('open') | |
.attr('data-total', 0); |
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
CSS.registerProperty({ | |
name: '--tooth-width', | |
syntax: '<length>', | |
initialValue: '40px', | |
inherits: false | |
}); | |
CSS.registerProperty({ | |
name: '--tooth-height', | |
syntax: '<length>', | |
initialValue: '20px', |
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
string city = Request.QueryString["city"] ?? ""; |
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
class PlaceholderBoxPainter { | |
paint(ctx, size) { | |
ctx.lineWidth = 2; | |
ctx.strokeStyle = '#666'; | |
// draw line from top left to bottom right | |
ctx.beginPath(); | |
ctx.moveTo(0, 0); | |
ctx.lineTo(size.width, size.height); | |
ctx.stroke(); |
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
// tweak this | |
$width: 200px; | |
// automatically computed | |
$side-length: ($width / 2) / cos(30deg); | |
$cap-y-scale: tan(30deg); | |
$cap-height: ($width / 2) * $cap-y-scale; | |
$cap-unscaled-side-length: $width / sqrt(2); |
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 str = '1 + 1 + 1 = 3'; | |
str.replace(/\+/g, 'plus'); | |
// "1 plus 1 plus 1 = 3" |
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 obj = incomingObj || {}; |
NewerOlder