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
const Benchmark = require('benchmark').Benchmark; | |
const suite = new Benchmark.Suite; | |
const users = new Array(50).fill().map(gen); | |
const logins = new Array(10).fill().map(gen); | |
function random(min, max) { | |
return Math.floor(Math.random() * (max - min)) + min; | |
} |
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,body { | |
min-height: 100%; | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
body { | |
display: flex; | |
flex-direction: column; |
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 { | |
display: flex; | |
width: 100%; | |
height: 200px; | |
} | |
.b { | |
background: blue; | |
min-width: 100px; | |
min-height: 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
const Benchmark = require('benchmark').Benchmark; | |
const suite = new Benchmark.Suite(); | |
function uid() { | |
return 'xxx'.replace(/x/g, function(c) { | |
return Math.floor(Math.random()*10); | |
}); | |
} | |
const count = 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
@font-face | |
{ | |
font-family: 'Open Sans'; | |
font-weight: normal; | |
src: local('Open Sans'); | |
src: url(data:application/octet-stream;base64,d09GRgABAAAAAPjgABIAAAABnwwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABlAAAABwAAAAcXcVGfkdERUYAAAGwAAAAHgAAACAD3gADR1BPUwAAAdAAAAAgAAAAIGyRdI9HU1VCAAAB8AAAAb8AAAKKSI+4209TLzIAAAOwAAAAXwAAAGChNp7WY21hcAAABBAAAAMiAAAEfs0qHI1jdnQgAAAHNAAAAEQAAABECwcOSmZwZ20AAAd4AAABsQAAAmUPtC+nZ2FzcAAACSwAAAAIAAAACAAAABBnbHlmAAAJNAAAz9oAAVocaDlL+GhlYWQAANkQAAAAMwAAADb6fLBQaGhlYQAA2UQAAAAhAAAAJA3MCX1obXR4AADZaAAABzkAAA6881I+gmxvY2EAAOCkAAAHMwAAB2R3/NCSbWF4cAAA59gAAAAgAAAAIATnAq1uYW1lAADn+AAAAPUAAAG+JThAUXBvc3QAAOjwAAAPFgAAH3APmSRLcHJlcAAA+AgAAADYAAABfMhgFiwAAAABAAAAAMmJbzEAAAAAyTUxiwAAAADLBqXBeNpjYGRgYOADYgkGEGBiAPKZNwBJFjCPAQAL8QDlAAAAAQAAAAoAHAAeAAFsYXRuAAgABAAAAAD//wAAAAAAAHjaXVJNaxNRFD1vTpM0g4tAkqqxFHFRsijFKmTZlRRSkkwRKV0FgtCiTBNlJkaEfmptq7b18wfEfqlV202LS3+DC7dSiiAiIhKki0J638uAKMOcc9+95368OwMFwMYVfIZyS34Z7YjByju5s0hfdvKCQLOJqKgUiDaEEEZEVFHjt43f+i9iu9fGSuh3y9VxXHIrV10MVrQ9dEPjiFdyfRQ9 |
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, body { | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
} | |
.one { | |
background-color: yellow; | |
width: 200px; | |
height: 100px; | |
margin-top: 10%; |
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 { | |
display: flex; | |
flex-flow: column nowrap; | |
width: 200px; | |
height: 200px; | |
background: yellow; | |
border: 1px solid #999; | |
padding: 5px; | |
box-sizing: border-box; | |
} |
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 RusToTranslit( text ) { | |
return text.replace(/([а-яё])|([\s_-])|([^a-z\d])/gi, | |
function(all, ch, space, words, i) { | |
if (space || words) { | |
return space ? '-' : ''; | |
} | |
var code = ch.charCodeAt(0), | |
next = text.charAt(i+1), | |
index = code == 1025 || code == 1105 ? 0 : code > 1071 ? code - 1071 : code - 1039, |
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
.ir { | |
text-indent: 100%; | |
white-space: nowrap; | |
overflow: hidden; | |
} |
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
.ir { | |
border: 0; | |
font: 0/0 a; | |
text-shadow: none; | |
color: transparent; | |
background-color: transparent; | |
} |
NewerOlder