Skip to content

Instantly share code, notes, and snippets.

View bsa7's full-sized avatar

Belevskij Sergeij bsa7

View GitHub Profile
@bsa7
bsa7 / file_dir_recursive.bash
Created July 30, 2014 04:21
recursive chmod, chown for files or directories only
find /path/to/base/dir -type d -exec chmod 755 {} +
find /path/to/base/dir -type f -exec chmod 644 {} +
@bsa7
bsa7 / help.md
Last active April 11, 2020 04:43
webpack-cli 3 help
npx webpack -h
webpack-cli 3.3.11

Usage: webpack-cli [options]
       webpack-cli [options] --entry <entry> --output <output>
 webpack-cli [options]  --output 
@bsa7
bsa7 / help.md
Created April 11, 2020 04:43
webpack-cli 3 help

npx webpack -h webpack-cli 3.3.11

Usage: webpack-cli [options] webpack-cli [options] --entry --output webpack-cli [options] <entries...> --output webpack-cli [options]

For more information, see https://webpack.js.org/api/cli/.

@bsa7
bsa7 / readme.md
Last active April 8, 2020 09:20
href elements terminology
/**
 * location terminology: https://xxxxx.ru/users/:userId/news/:newsId?param1=value1&param2=value2#param3=value3
 * protocol              ^^^^^
 * domain                        ^^^^^^^^
 * hostname              ^^^^^^^^^^^^^^^^
 * pathname                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 * pathnameParams: { userId: xxx, newsId: yyy }
 * search                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 * searchParams: { param1: value1, param2: value2 }
2019/06/04 05:21:50 [debug] 1239#1239: accept on 0.0.0.0:443, ready: 0
2019/06/04 05:21:50 [debug] 1239#1239: posix_memalign: 000055BBAC706B50:512 @16
2019/06/04 05:21:50 [debug] 1239#1239: *130 accept: 85.15.188.96:63602 fd:20
2019/06/04 05:21:50 [debug] 1239#1239: *130 event timer add: 20: 60000:887463
2019/06/04 05:21:50 [debug] 1239#1239: *130 reusable connection: 1
2019/06/04 05:21:50 [debug] 1239#1239: *130 epoll add event: fd:20 op:1 ev:80002001
2019/06/04 05:21:50 [debug] 1239#1239: *130 http check ssl handshake
2019/06/04 05:21:50 [debug] 1239#1239: *130 http recv(): 1
2019/06/04 05:21:50 [debug] 1239#1239: *130 https ssl handshake: 0x16
2019/06/04 05:21:50 [debug] 1239#1239: *130 tcp_nodelay
@bsa7
bsa7 / Educa - git basics.md
Last active April 12, 2019 11:56
Educa - git basics

Мы на ветке master

git branch
=> 
* master

Создаём ветку, относящуюся к задаче:

git checkout -b EDW-1234-task_short_name
@bsa7
bsa7 / temp.md
Created February 25, 2019 18:08
code_style

Требования к качеству кода javascript

Процесс написания кода сопровождается проверкой кода с помощью ESLint прямо в процессе правки.

Сделайте соответствующие настройки в своей IDE, например для Visual Studio Code вы можете установить плагины:

Обязательные требования:

@bsa7
bsa7 / app.html
Created February 20, 2019 14:21
Sample of React Select
<div id="app"></div>
@bsa7
bsa7 / test_unstable_results.log
Created December 19, 2018 21:17
Странная непостоянность тестов
###################################################################
# RAILS_ENV=test bundle exec rails db:migrate:reset
# RAILS_ENV=test rspec spec/integration/v2/teacher_class_spec.rb
###################################################################
Finished in 6.01 seconds (files took 7.45 seconds to load)
10 examples, 1 failure
Failed examples:
@bsa7
bsa7 / elasticsearch_helper.rb
Created December 7, 2018 06:28
interface for elastic
# frozen_string_literal: true
require 'elasticsearch'
connection_params = {
log: false,
}
connection_params[:user] = ENV['ELASTICSEARCH_USERNAME'] || 'elastic'
connection_params[:password] = ENV['ELASTICSEARCH_USERPASSWORD'] || 'elastic'
connection_params[:host] = ENV['ELASTICSEARCH_HOST'] || 'localhost'