Skip to content

Instantly share code, notes, and snippets.

View viktor-yakubiv's full-sized avatar
🇺🇦

Viktor Yakubiv viktor-yakubiv

🇺🇦
View GitHub Profile
@viktor-yakubiv
viktor-yakubiv / index.html
Created January 13, 2017 10:19
Responsive images
<img class="img-responsive" src="..." alt="...">
@viktor-yakubiv
viktor-yakubiv / bundlers.md
Last active January 15, 2019 16:36
Notes about bundlers. Basic desciption and usage of Node.js, Gulp and Webpack.

Bundlers

Notes about bundlers. Basic desciption and usage of Node.js, Gulp and Webpack.

Node.js

Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient. Node.js' package ecosystem, npm, is the largest ecosystem

@viktor-yakubiv
viktor-yakubiv / gulp.md
Last active January 15, 2019 16:36
Gulp Introduction

Введення в Gulp

Нсамперед, [Gulp][gulp] потребує встановленого [Node.JS][node] та менеджера пакетів [NPM][npmjs]. Для цього достатньо встановити будь-яку версію, завантаживши її з веб-сайту або через [системний пакетний менеджер][node-install-pm].

Після встановлення Node, потрібно встановити Gulp в глобальний простір, щоб команди були доступними із командного рядка.

@viktor-yakubiv
viktor-yakubiv / scoped.js
Created May 23, 2020 19:08
CSS Modules Utils
class ClassName extends String {
and(s) {
const merged = [this.toString(), s].filter((meaningful) => meaningful).join(' ')
return new ClassName(merged)
}
}
const createModule = (map) => (strings, ...args) => {
const classList = [...strings.flatMap(s => s.split(/\s+/)), ...args]
.filter((meaningful) => meaningful)
@viktor-yakubiv
viktor-yakubiv / check-eslint-typescript.sh
Created November 12, 2021 08:32
Check if you use proper TypeScript rules for ESLint
# Run within this directory:
# https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/docs/rules
#
# Before running execute `eslint --print-config <src> > eslint.json`
# and copy this file to the directory where this script is ran.
for file in $(ls *.md); do
rule=${file%.md}
# fgrep "\"$rule\"" eslint.json
es_res=$(jq ".rules[\"$rule\"][0]" eslint.json)
@viktor-yakubiv
viktor-yakubiv / README.md
Last active January 26, 2022 10:31
Smart GitHub PR creation

Smart GitHub PR

Store the script somewhere, where it could be accessible as a binary.

Create an alias like below to use is easily.

alias pr="gh-smart-pr.sh"
@viktor-yakubiv
viktor-yakubiv / icons.svg
Created March 28, 2022 16:16
SVG sprite boilerplate
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@viktor-yakubiv
viktor-yakubiv / emoji-font-test.html
Created April 4, 2022 12:07
Emoji font-family test
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emoji test</title>
<style>
body {
max-inline-size: 65ch;