Skip to content

Instantly share code, notes, and snippets.

View Sun1ive's full-sized avatar
🎯
Focusing

Sunlive Sun1ive

🎯
Focusing
  • Vinnitsa, Ukraine
View GitHub Profile
@Sun1ive
Sun1ive / init.vim
Created November 12, 2019 20:22 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@Sun1ive
Sun1ive / init.vim
Created November 12, 2019 20:22 — forked from benawad/init.vim
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@Sun1ive
Sun1ive / Include-in-Sequelize.md
Created December 4, 2018 13:42 — forked from zcaceres/Include-in-Sequelize.md
using Include in sequelize

'Include' in Sequelize: The One Confusing Query That You Should Memorize

When querying your database in Sequelize, you'll often want data associated with a particular model which isn't in the model's table directly. This data is usually typically associated through join tables (e.g. a 'hasMany' or 'belongsToMany' association), or a foreign key (e.g. a 'hasOne' or 'belongsTo' association).

When you query, you'll receive just the rows you've looked for. With eager loading, you'll also get any associated data. For some reason, I can never remember the proper way to do eager loading when writing my Sequelize queries. I've seen others struggle with the same thing.

Eager loading is confusing because the 'include' that is uses has unfamiliar fields is set in an array rather than just an object.

So let's go through the one query that's worth memorizing to handle your eager loading.

The Basic Query

@Sun1ive
Sun1ive / radio
Created September 18, 2018 09:05
radio buttons component
<div
slot="title"
class="radio-wrapper"
>
<div
v-for="radio in radioGroup"
:key="radio.value"
class="flex-radio"
>
<label
в tsconfig.json
],
"files": [
"src/*.d.ts"
]
в src/shims.d.ts
declare module '@fortawesome/*';
declare module 'v-click-outside-x';
@Sun1ive
Sun1ive / postman-deb.sh
Created July 4, 2018 10:39 — forked from SanderTheDragon/postman-deb.sh
A shellscript to create a Postman .deb file, for simple installation on Debian-based Linux distro's. Also creates a .desktop file.
#!/bin/sh
script=`basename "$0"`
if [ $# -gt 0 ] && [ "$1" = "-e" ]; then
e="-e"
fi
echo "Removing old Postman tarballs"
rm -f $(ls Postman*.tar.gz)
@Sun1ive
Sun1ive / test-task.md
Created June 23, 2018 16:26 — forked from alpanyukov/test-task.md
Intern / Junior Front-End Developer Position: Test Task

Test Task for Intern / Junior Front-End Developer Position

Основная задача тестового не узнать как сильно вы знаете React, а посмотреть насколько хорошо вы сможете разобраться с новыми технологиями в относительно короткий срок. В идеале, на него нужно потратить не более 3 дней. А так - делайте сколько делается.

Описание

Нужно написать одностраничное приложения для просмотра фильмов с помощью The Movie Database API.

При открытии приложения, должен отображаться список популярных фильмов с пагинацией или динамической подгрузкой (на выбор). Также на странице должно быть поле для поиска. Когда ты вводишь туда какой-то текст, должны отобразиться фильмы которые ему соответствуют. Для каждого фильма в списке должен отображаться список жанров (названий жанров, не айдишек), к которым он принадлежит.

@Sun1ive
Sun1ive / nginx nuxt docker-compose
Created May 22, 2018 19:59
nginx nuxt docker-compose
## docker ##
version: '3.3'
services:
web:
image: nginx
restart: always
volumes:
- ./nginx/config:/etc/nginx/conf.d
ports:
@Sun1ive
Sun1ive / mongo.txt
Last active June 14, 2018 09:14
mongodb docker
#docker-compose
version: '3.3'
services:
web:
image: nginx
restart: always
volumes:
- ./nginx/config:/etc/nginx/conf.d
- ./nginx/ssl:/etc/nginx/ssl
@media all and (max-width: 991px) { ... }
@media all and (max-width: 768px) { ... }
@media all and (max-width: 480px) { ... }
@media all and (max-width: 340px) { ... }