This file contains hidden or 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 fs = require('fs'); | |
const path = require('path'); | |
function findAllTsFiles(dir) { | |
let results = []; | |
const list = fs.readdirSync(dir); | |
list.forEach(file => { | |
const fullPath = path.join(dir, file); | |
const stat = fs.statSync(fullPath); | |
if (stat.isDirectory()) { |
This file contains hidden or 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 command | |
"vscode-debug": "playwright test apps/batch-journey-e2e/src/specs/csv-upload/csv-upload-select-template.e2e-spec.ts --config ./playwright.config.ts --workers=1" | |
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", |
This file contains hidden or 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
getDateArray() { | |
const arrAfter = new Array(); | |
const arrBefore = new Array(); | |
const dateAfter = new Date(); | |
const dateBefore = new Date(); | |
const dateFrom = moment(new Date()).subtract(7, 'd'); | |
const dateTo = moment(new Date()).add(7, 'd'); | |
while (dateBefore >= dateFrom.toDate()) { |
This file contains hidden or 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
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ name: 'bcEllipsis' }) | |
export class EllipsisPipe implements PipeTransform { | |
transform(str: string, strLength: number = 250) { | |
const withoutHtml = str.replace(/(<([^>]+)>)/gi, ''); | |
if (str.length >= strLength) { | |
return `${withoutHtml.slice(0, strLength)}...`; | |
} |
This file contains hidden or 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
declOfNum(n, titles): string { | |
return titles[(n % 10 === 1 && n % 100 !== 11) ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2] | |
} |
This file contains hidden or 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
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
/* стили только для IE10 */ | |
} |
This file contains hidden or 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
try { | |
for (var i = 0; i < item.length; i++) { | |
var e = item[i].getElementsByTagName('img'); | |
var attr = e[0].attributes; | |
var link = ""; | |
for (var z = 0; z < attr.length; z++) { | |
if (attr[z].name === "data-src") { |
This file contains hidden or 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
In VS Code go to Code (or File for Windows users) > Preferences > Workspace Settings and add this code snippet: | |
{ | |
"files.exclude": { | |
"**/*.js": { | |
"when": "$(basename).ts" | |
}, | |
"**/*.map": { | |
"when": "$(basename).map" | |
} |
This file contains hidden or 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
.line-clamp | |
-webkit-line-clamp: 3 | |
-webkit-box-orient: vertical | |
display: -webkit-box | |
overflow: hidden |
This file contains hidden or 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
//для изпользования добавить animate css и waypoints | |
setTimeout(function(){//применение анимацмм к маркерам при загрузке | |
$('.ymaps-2-1-42-placemark-overlay').each(function(i, elem){ | |
$(this).css({ | |
'animation-delay':'0.'+i*12+'s', | |
}).find('[class*=71x71],[class*=46x46],[class*=58x58]').css({ | |
'borderRadius': '50%', | |
'boxShadow': 'rgba(0, 0, 0, 0.298039) 5px -2px 5px -3px' | |
}); |
NewerOlder