Skip to content

Instantly share code, notes, and snippets.

View iL53n's full-sized avatar

Illia Hrybko iL53n

  • EPAM Systems @epam
  • Poland, Krakow
View GitHub Profile
Задание_Архитектура клиент-сервер и HTTP-протокол
1. Сформируйте и отправьте по указанному выше url:
....................................................
1.1 GET запрос без параметров
....................................................
> ncat -C httpbin.org 80
GET / HTTP/1.1
Host:httpbin.org
#>>1. С помощью SQL (DDL):
#Создайте базу данных test_guru
postgres=# create database test_guru;
CREATE DATABASE
#Таблицу categories с атрибутом title
test_guru=# CREATE TABLE categories (
test_guru=# id serial PRIMARY KEY,
#app/config/unicorn/production.rb
# paths
app_path = "/home/deployer/qna"
working_directory "#{app_path}/current"
pid "#{app_path}/current/tmp/pids/unicorn.pid"
# listen
listen "#{app_path}/shared/tmp/sockets/unicorn.qna.sock", backlog: 64
@iL53n
iL53n / qna.monit.rc
Last active September 18, 2019 20:22
### Nginx ###
check process nginx
with pidfile /run/nginx.pid
start program = "/usr/sbin/service nginx start"
stop program = "/usr/sbin/service nginx stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if memory usage > 80% for 5 cycles then restart
if failed host 157.245.66.174 port 80 protocol http
then restart
module.exports = {
install: function(Vue, cable) {
Vue.mixin({
destroyed: function() {
if (!this._subscriptions) return
Object.keys(this._subscriptions).map((key) => {
this._subscriptions[key].unsubscribe()
})
},
mounted: function() {
@iL53n
iL53n / rubocop_pre_commit_hook.rb
Last active April 22, 2020 18:13 — forked from palkan/rubocop_pre_commit_hook
Rubocop pre-commit hook.rb
#!/usr/bin/env ruby
# -- Install --
# ln -s rubocop_pre_commit.rb .git/hooks/pre-commit
# chmod +x .git/hooks/pre-commit
ADDED_OR_MODIFIED = /^\s*(A|AM|M)/.freeze
changed_files = `git status --porcelain`.split(/\n/)
unstaged_files = `git ls-files -m`.split(/\n/)
@iL53n
iL53n / 01_readme.md
Created April 23, 2020 17:54 — forked from palkan/01_readme.md
Docker Dev
@iL53n
iL53n / Guardfile
Created April 23, 2020 18:00 — forked from palkan/Guardfile
Guardfile for Rails
# По умолчанию запускаем только необходимых для тестов наблюдателей,
# то есть всех, кроме server.
# Для запуска всех: bundle exec guard -g default
scope groups: ['specs']
group 'specs' do
# запускаем тесты и использованием Spring
guard :rspec, cmd: "bundle exec spring rspec" do
require "guard/rspec/dsl"
dsl = Guard::RSpec::Dsl.new(self)
@iL53n
iL53n / .travis.yml
Created April 23, 2020 18:04 — forked from palkan/.travis.yml
Travis config for TH project
language: ruby
rvm:
- 2.2.3
# Если Travis пишет вам слишком часто, то отключаем email уведомления
notifications:
email: false
# Указываем базу данных
addons:
@iL53n
iL53n / Gemfile
Created June 25, 2020 12:12 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers