Skip to content

Instantly share code, notes, and snippets.

View VasylShevchenko's full-sized avatar
🏃‍♂️
Running

Vasyl Shevchenko VasylShevchenko

🏃‍♂️
Running
View GitHub Profile
@VasylShevchenko
VasylShevchenko / Breakpoints
Created August 5, 2019 21:06 — forked from janily/Breakpoints
Mobile-first CSS Media Queries Breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
1) Go to bitbucket add ssh key Known hosts
// Add server id_rsa.pub to this link
https://bitbucket.org/winstrategy/NAME_PROJECT/admin/access-keys/
// Generate SSH pub and private and add pub to server
https://bitbucket.org/winstrategy/NAME_PROJECT/admin/addon/admin/pipelines/ssh-keys
// Add dotnet service
deployer$ sudo vim /etc/systemd/system/dotnet.service
@VasylShevchenko
VasylShevchenko / .rubocop.yml
Created June 20, 2019 07:32 — forked from PavloBezpalov/.rubocop.yml
Rubocop settings that helps
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 2.4
DisabledByDefault: true
Exclude:
- db/**/**
- bin/*
# Prefer &&/|| over and/or.
gem 'interactor'
gem 'whenever', require: false
gem 'render_async'
gem 'figaro'
gem 'dotenv'
gem 'dotenv-rails', groups: [:development, :test]
deploy:
image: ubuntu:latest
stage: deploy
only:
- master
before_script:
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
- apt-get install -y rsync
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
# vim /etc/systemd/system/sidekiq.service
# sudo systemctl start sidekiq.service
# sudo systemctl enable sidekiq.service
[Unit]
Description=Sidekiq for emedcert (staging)
Wants=nginx.service postgresql.service
After=redis.service postgresql.service
[Service]
@VasylShevchenko
VasylShevchenko / 1 SETUP Ubuntu 20.04 LTS (DigitalOcean)
Last active September 22, 2023 19:31
Deploy Rails to VPS(Ubuntu 20.04LTS). Nginx mainline + pagespeed, Puma with Jungle, Capistrano3, PostgreSQL, RVM, Certbot
//------ ROOT --------
root# apt-get update
root# apt-get upgrade
// Dependencies
apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev \
libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev \
libpcre3-dev unzip htop zip
@VasylShevchenko
VasylShevchenko / terminal-git-branch-name.md
Last active November 11, 2024 13:43 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

reload .bash_profile from the command line


Certbot

Working

  1. For get

    server {
      listen 80;
@VasylShevchenko
VasylShevchenko / git_flow.md
Last active November 2, 2018 20:19 — forked from PavloBezpalov/git_flow.md
Pivotal Git Flow

Git Flow

Working on stories

  1. Start story in pivotal tracker and copy it id (STORY_ID).

  2. Checkout development branch and pull from remote