Skip to content

Instantly share code, notes, and snippets.

View andrejsharapov's full-sized avatar
💻
Notebook ASUS & VSCode my love)

Andrej Sharapov andrejsharapov

💻
Notebook ASUS & VSCode my love)
View GitHub Profile
@andrejsharapov
andrejsharapov / filter.vue
Created December 9, 2025 16:45
wagons viewer
<template>
<div>
<!-- Filter: RPS -->
<v-select
v-model="park.selectWagon.rps"
:items="rpsOptions"
label="RPS"
dense
item-text="groupName"
item-value="groupId"
@andrejsharapov
andrejsharapov / card-model
Created September 24, 2025 12:22
3d model threejs (vue2)
<template lang="pug">
.card-model
v-card.pa-2.rounded-lg(v-box-shadow='9')
v-img.rounded-lg(
v-if='item.tools.includes("blockbench")'
:src='"/src/nuxt-app/modeling/" + item.alt + ".gif"',
:alt='item.alt'
)
lazy-s-pages-modeling-three-d-model-viewer(
v-else
@andrejsharapov
andrejsharapov / spy.html
Last active April 28, 2025 08:43
Spy Maze Game
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Шпионский лабиринт v1.1.0</title>
<style>
body {
background-color: #222;
@andrejsharapov
andrejsharapov / extensions
Last active November 26, 2024 13:41
My VS Code extensions
Auto Close Tag
Auto Complete Tag
Auto Rename Tag
Babel JS
Batch Rename
Code Spell Checker + Russia
Color Highlight
Comments Anchor
@andrejsharapov
andrejsharapov / event-banner.js
Created September 18, 2024 09:20
vue save/read to localStorage (event-banner as v-snackbar)
export default {
data: () => ({
eventForClientBanner: true,
eventForClientDate: null,
}),
mounted() {
if (localStorage.eventForClientBanner) {
this.eventForClientBanner = JSON.parse(localStorage.getItem('eventForClientBanner'));
this.eventForClientDate = JSON.parse(localStorage.getItem('eventForClientDate'));
@andrejsharapov
andrejsharapov / html
Created September 17, 2024 07:24
vue component switcher
<template>
<v-card>
<div v-if="!currentTab">
...
</div>
<component v-else :is="currentTabComponent" />
</v-card>
<v-row class="d-flex align-center">
<v-col v-for="tab in games" :key="tab.name">
@andrejsharapov
andrejsharapov / eventTimer.js
Last active September 16, 2024 11:36
таймер обратного отсчета на js или moment.js с таймзоной
import moment from 'moment';
eventTimer() {
// const now = new Date();
// const start = new Date(this.info.recdatebegin);
// const end = new Date(this.info.recdateend);
// const diff = new Date(start.getTime() - now.getTime());
// const empty = new Date(0);
// const days = diff.getDate() - empty.getDate();
// const hours = diff.getHours() - empty.getHours();
@andrejsharapov
andrejsharapov / queries.sql
Created July 9, 2024 07:37
Elasticsearch - Kibana - Dev Tools
GET index/_search
{
"query": {
"match_all": {}
}
}
// by id
GET index/_doc/1
@andrejsharapov
andrejsharapov / getNoun.vue
Created June 20, 2024 08:06
Склонение слов
<template>
{{
getNoun(YourCount,
'комментарий',
'комментария',
'комментариев'
)
}}
</template>
@andrejsharapov
andrejsharapov / my-file.vue
Created May 17, 2024 07:13
Save states to localStorage (for Vue 2)
// change `nameState`
export default {
data: () => ({
nameState: 0,
}),
watch: {
nameState(state) {
localStorage.setItem('nameState', JSON.stringify(state));
},
},