Skip to content

Instantly share code, notes, and snippets.

View kopo4eweb's full-sized avatar
🏠
Working from home

Artem Nikolenko kopo4eweb

🏠
Working from home
View GitHub Profile
### 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 qna.kopo4e.ru port 443 protocol https
then restart
if 3 restarts within 5 cycles then timeout
@kopo4eweb
kopo4eweb / rails http status codes
Created August 28, 2021 09:59 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@kopo4eweb
kopo4eweb / rubocop.yml
Created March 2, 2021 15:23 — forked from georgiybykov/rubocop.yml
GitHub actions config file to check project by RuboCop
# .github/workflows/rubocop.yml
name: RuboCop
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
@kopo4eweb
kopo4eweb / .rubocop.yml
Created March 2, 2021 14:31 — forked from georgiybykov/.rubocop.yml
Rubocop config file
require:
- rubocop-performance
- rubocop-rails
- rubocop-rspec
AllCops:
TargetRubyVersion: 2.7.2
NewCops: enable
Exclude:
- bin/**/*
@kopo4eweb
kopo4eweb / temp_file.css
Last active July 29, 2021 22:05
Вопрос по <1> из TestGuru
body {
color: red;
}
@kopo4eweb
kopo4eweb / node_nginx_ssl.md
Created October 1, 2019 18:02 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@kopo4eweb
kopo4eweb / bash_prompt.sh
Created September 25, 2019 15:34 — forked from ondras/bash_prompt.sh
Set color bash prompt according to active Git or Mercurial branch/bookmark and return status of last command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current Git or Mercurial repository
# * the return value of the previous command
#
# USAGE:
#
# начало разработки
hg pull
hg up release
hg branch {branch-name}
# разработка
hg commit -m "сообщение"
hg pull
hg up default
hg merge {branch-name}
http://bxslider.com/
http://www.owlcarousel.owlgraphic.com/
http://idangero.us/swiper/#.VxzWMvmLTDc
http://kenwheeler.github.io/slick/
@kopo4eweb
kopo4eweb / package.json
Created March 2, 2016 12:48
Простая конфигурация webpack и nodejs для работы с React
{
"name": "name",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server"
},
"author": "",
"license": "ISC",