Skip to content

Instantly share code, notes, and snippets.

View inem's full-sized avatar
🌰
In progress

Ivan Nemytchenko inem

🌰
In progress
View GitHub Profile
# Makes git push and creates Merge Request at the same time
# If you follow branch naming convention like "ucp-123/new-authorization", MR title will be "UCP-123 New authorization", which will be cross-linked to Jira
# Make sure to replace "ucp" with your shortcut.
# IMPORTANT PREREQUISITE: to run `git config committer.name <your_gitlab_username>` once, so that it gets used for `make publish!` to assign MR to you
USERNAME := $(shell git config committer.name)
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
ticket_pattern := ucp-[0-9][0-9][0-9]
TICKET := $(shell git rev-parse --abbrev-ref HEAD | grep -o '$(ticket_pattern)' | tr [:lower:] [:upper:])
@inem
inem / grades
Created October 22, 2021 07:05 — forked from mokevnin/grades
Грейды в компании занимающейся видеостриммингом
L1
Базовые знание диалекта Typescript, основных встроенных примитивов (Array, Object, Function, String, Date) и методов работы с ними, понимание контекста (this) и способов управления им
Базовые знания фреймворка React
Знание наиболее часто используемых Web API: fetch/XHR, Storage, PostMessage, DOM
Умение писать простейшие алгоритмы (поиск, сортировка, сравнение объектов) без требований к их оптимальности.
Навыки кроссбраузерной адаптивной верстки по макету с использованием существующего кода, знание CSS и препроцессора SCSS
Навыки отладки разметки в браузерах Chrome/Safari
Знание принципов работы HTTP, отличий между различными методами, принципов работы Cookies
Практическое владение лучшими практиками структурирования кода: SOLID/DRY/KISS и т.д.
Базовые знания git, понимание git flow
<div style='display: flex; width: 120px; height: 70px;'>
<%= image_tag field.to_s, style: 'width: 100%; height: 100%; object-fit: contain;' %>
</div>
<div style='display: flex; width: 120px; height: 70px;'>
<%= image_tag field.to_s, style: 'width: 100%; height: 100%; object-fit: contain;' %>
</div>
setup:
rails db:create
rails db:migrate
rails db:seed
rails db:fixtures:load
db:
rails db:migrate
fix:
require 'oga'
require 'open-uri'
require 'pry'
url = './index.html'
html = open(url)
class FilmLibrary
def initialize(films)
@films = films
@inem
inem / .dockerignore
Last active May 8, 2020 13:18
Improving speed of docker builds with two Gemfiles
ansible
vendor/cache
log/*
tmp/cache/*
test
@inem
inem / Simple Form.md
Created January 13, 2020 13:12 — forked from stevenyap/Simple Form.md
Simple Form Cheatsheet

Gemfile

gem 'simple_form'

Installation

rails generate simple_form:install
@inem
inem / clean_code.md
Created January 13, 2020 10:04 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

Material Views as a first class citizens in Rails app

Abstract

Material Views are highly underrated in Rails community. They can save you a lot of time when you deal with a database of complex structure.

Demonstrated solution is cheap, contains no plain SQL, helps to keep business logic within main app. and requires no migrations/versioning

Description