Skip to content

Instantly share code, notes, and snippets.

View DariaUlanova's full-sized avatar

Daria DariaUlanova

  • Saint-Petersburg
  • 11:11 (UTC +03:00)
View GitHub Profile

LP Corporate Server

Conventions

Use BEM

Class names accordingly to BEM

Good

Load test DB to be sure it is up-to-date.

(for example you want to run specs on CS then you need to load RS DB as CS uses rs models from RS)

$ bundle exec rake db:test:load

Run all existing specs, in CS, for instance

Пример js для работы пары из множестрва контроллов настройти таргетирования рекламной кампании.

Выбор устройств Targetings.MobilePlatforms.GoogleDevices и

выбор канала доступа в интернет Targetings.MobileOperators.Google для рекламной кампании гугла.

https://monosnap.com/file/uOSuIys6BkMmuzkbEOj20eVERb5kxF

Releadgion.com is a one place where people buy mobile and web advertising from many platforms such as Google Adwords, Facebook.

One of the platform is MyTarget.com

There was a task to realize usage of MyTarget leading ad campaigns through Releadgion UI.

(create campaigns, ads, set up ad targetings and etc.)

There is a base class MyTarget::Api::ApiBase whitch is responsible for MyTarget API.

def solution(array)
max_distance = 0
indexes = {}
array.each_with_index do |item, index|
if indexes.keys.include?(array[index])
max_distance = [max_distance, index - indexes[array[index]]].max
else
indexes[array[index]] = index
end

У нас в проекте вся вёрстка из сделанного вами макета будет переводиться из html в slim (http://slim-lang.com/), а css стили в sass (http://sass-lang.com/).

Общие требования

  1. Верстать дивами, без таблиц, без css фреймворков. Таблицы использовать только в случае, если надо сверстать таблицу.
  2. Мы используем при вёрстке независимые блоки по аналогии с БЭМ. Блоки именуем с префиксом b-.

Каждый блок помещается в отдельный файл. Префиксы для дочерних классов блока, как в оригинальном БЭМ, не используем (используем вложенные классы sass).

Используем лейауты с префиксом l- для каких-то верхних элементов, которые глобально определяют композицию страницы.