with a hat tip to Sublime Text 2 Shortcuts
| ⌘; | autocomplete |
| ⌘⌥B | instant replay |
| ⌘⌥E | search across all tabs |
with a hat tip to Sublime Text 2 Shortcuts
| ⌘; | autocomplete |
| ⌘⌥B | instant replay |
| ⌘⌥E | search across all tabs |
| -- View Current Lock | |
| SELECT c.relname, l.mode, l.granted, l.pid FROM pg_locks as l JOIN pg_class as c on c.oid = l.relation; | |
| -- UTF-8 text search by index | |
| create index on <table> (<column> text_pattern_ops); | |
| -- Generate nodes path | |
| create table <table> as select i, format('/%s/%s/', (random() * 10), (random() * 10)) from generate_series(1,100000); | |
| -- Create extension |
| #require 'rubygems' | |
| require 'pp' | |
| #require 'ap' # Awesome Print | |
| class Object | |
| # expects [ [ symbol, *args ], ... ] | |
| def recursive_send(*args) | |
| args.inject(self) { |obj, m| obj.send(m.shift, *m) } | |
| end | |
| end |
| class RecountMediamapService | |
| def initialize(task) | |
| @task = task | |
| @comparisons_ids = Film.where.not(kinopoisk_rate: nil).where.not(kinopoisk_rate: 0).where('kinopoisk_num > 10').order(year: :desc, kinopoisk_rate: :desc, kinopoisk_num: :desc).limit(20000).pluck(:id) | |
| @film = Film.includes(:genres, :subgenres, :countries, :tags, :people).find(@task.task.to_i) | |
| end | |
| def recount | |
| begin | |
| kbs = {} |
| # config/routes.rb | |
| YandexKassaIntegration::Application.routes.draw do | |
| # ... | |
| scope '/yandex_kassa' do | |
| controller 'yandex_kassa', constraints: { subdomain: 'ssl' } do | |
| post :check | |
| post :aviso | |
| get :success | |
| get :fail |
####sessions
tmux new -s session_name # new session by name
tmux attach -t session_name # attach session by name (you can also use a instead of attach)
tmux switch -t session_name # switch session by name (you can also use a instead of attach)
tmux list-sessions # list existing sessions
bind-key : new -s session_name # new session from within a session
// detach
tmux detach # detach currently attached session
| AllCops: | |
| TargetRubyVersion: 2.3 | |
| Exclude: | |
| - 'db/schema.rb' | |
| - 'vendor/**/*' | |
| - 'tmp/**/*' | |
| - 'bin/*' | |
| - 'docs/**/*' | |
| Metrics/LineLength: |
| bundler add countries --version "~> 3.0.1" --require false |
| 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 |
| module Developer | |
| extend self | |
| delegate :establish_connection, :clear_all_connections!, :to => ActiveRecord::Base | |
| def delayed_debug(scope) | |
| detach_process do | |
| close_io_objects | |
| establish_connection | |
| setup_process_name | |
| notify_developers |