Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Vladislav Kaufman faforty

🎯
Focusing
  • Accessible World Inc.
  • USA
Block or report user

Report or block faforty

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@faforty
faforty / utm_parse.js
Created Feb 11, 2019
utm parse and add to links
View utm_parse.js
function getRefQueryParam(name) {
name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
var results = regex.exec(location.search);
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
};
let utmParamQueryString = '';
let utmParamQueryStringTrimmed = '';
View handleClickOutside
handleClickOutside (event) {
const uiModalBox = this.$refs.uiModalBox
if (!event.path.includes(uiModalBox) && !event.path.includes(this.el) && this.isShow == true) {
this.close()
}
}
View Kill Port
sudo lsof -t -i tcp:8080 | xargs kill -9
View spider files
'use strict'
const fs = require('fs')
const path = require('path')
const rootFolder = __dirname // Your folder
const spider = (folder = rootFolder, state = []) => {
fs.readdirSync(folder).forEach(file => {
let dir = path.join(folder, file),
isDir = fs.lstatSync(dir).isDirectory()
View semantic imposition
<section class="b-portfolio">
<!-- Center -->
<div class="container">
<div class="b-portfolio__box">
<div class="b-portfolio__box__items">Блок 1</div>
<div class="b-portfolio__box__items">Блок 2</div>
<div class="b-portfolio__box__items">Блок 3</div>
</div>
</div>
</section>
View ui-comment.vue
<template>
<ui-label :filled="filled" :label-show="true">
<template slot="label"><slot></slot></template>
<textarea class="form-control ui-comment-field" v-model="message"></textarea>
</ui-label>
</template>
<script>
import uiLabel from './ui-label.vue';
export default {
View tp-head-step
<template>
<router-link tag="div" :to="link" class="tp-head-step">
<ui-progress-bar :animate="{ progress: progress }" :size="size" :style="{margin: '0 auto 20px'}">
<div class="tp-head-step__info">
<span>{{ currentStep }}/{{ maxSteps }}</span>
</div>
</ui-progress-bar>
<div :class="['tp-head-step__left-link', {'tp-head-step__left-link--active': isActive, 'tp-head-step__left-link--disabled': !isActive ? isDisabled : false }]">Продукт<br> и поставка</div>
</router-link>
</template>
View ui-tabs
<ui-tabs align="top" :active="$route.name" :percent="50" :indicator-height="6" :indicator-border="false" class="b-platform-head-tabs" @change="activeTab">
<ui-tab v-for="(tab, index) in getTabs"
:name="tab.name"
:disabled="getCountedSteps() < index"
v-show="tabPage == tab.page">
<router-link :to="{ name: getCountedSteps() < index ? false : tab.name}">
{{ tab.title }}
</router-link>
</ui-tab>
<div slot="contents">
View ui-kit@1.0
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="form-group">
</div>
</div>
<div class="col-md-6">
View ui-toggleBox
<div class="ui-toggleBox">
<input id="ui-toggleBox-1" type="checkbox" class="ui-toggleBox__field">
<label for="ui-toggleBox-1" class="ui-toggleBox__label">Требования к разгрузке</label>
</div>
You can’t perform that action at this time.