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
/* reset styles for some elements */ | |
.inputrst { | |
display: inline-block; | |
position: relative; | |
margin: 0; | |
padding: 0; | |
border: none; | |
background-color: transparent; | |
font: inherit; | |
} |
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
total=0, document.querySelectorAll('.ellipsis.hours_played').forEach( node => node.innerHTML.match(/\d+[.,]?\d+/) ? total += parseFloat( node.innerHTML.match(/\d+[.,]?\d+/)[0] ) : ''), console.log(total) |
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
// npm run add map | |
// gulp addmap | |
function addMap(cb){ | |
var files = fs.readdirSync('./build'); | |
var links = 'ul.project__map\n'; | |
var path = './dev/components/map/_map.jade' | |
for(var i in files) { | |
if( files[i].split('.').pop() == '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
formats_str = ytplayer.config.args.adaptive_fmts || console.warn('No formats string'); | |
links_arr = formats_str.match(/http?s[^&|,]+/g); | |
links_arr.forEach(function(item, i, arr) { | |
item = decodeURIComponent(item); | |
// extract webm | |
if (/audio.+webm/.test(item) && /signature/.test(item)) console.info('webm', item); | |
// extract mp4 | |
if (/audio.+mp4/.test(item) && /signature/.test(item)) console.info('mp4', item); | |
if (/audio.+mp4/.test(item) && /signature/.test(item) && /ratebypass=yes/.test(item)) console.info('mp4', 'ratebypass=yes', item); | |
else if (/audio.+mp4/.test(item) && /signature/.test(item)) { |
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
/* | |
works with JQ | |
usage | |
<p class="targetElement">Text to scale</p> | |
$('.targetElement').scaleFontSize({minFontsize: 12}); | |
minFontsize минимальное размер шрифта для уменьшения, default 16px. | |
Определяется переполнение по ширине и высоте. | |
Определение переполнения по высоте работает если элементу задан height. |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |