Skip to content

Instantly share code, notes, and snippets.

View VasylShevchenko's full-sized avatar
🪬

Vasyl Shevchenko VasylShevchenko

🪬
View GitHub Profile
@jgravois
jgravois / aphorisms.md
Last active April 10, 2019 00:22
Questionable career advice
@strangerxx
strangerxx / 1 setup vps
Last active September 18, 2024 21:07 — forked from PavloBezpalov/1 setup vps
Deploy Rails 5.2.1 to VPS(Ubuntu 18.04.1 LTS). Nginx mainline + pagespeed, Puma with Jungle, Capistrano3, PostgreSQL 11, RVM, Certbot
root# apt-get update
root# apt-get upgrade
// dependencies for Ruby
root# 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
// Node.js v7
root# curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
@PavloBezpalov
PavloBezpalov / .rubocop.yml
Created June 19, 2019 14:01
Rubocop settings that helps
AllCops:
DisplayCopNames: true
DisplayStyleGuide: true
TargetRubyVersion: 2.4
DisabledByDefault: true
Exclude:
- db/**/**
- bin/*
# Prefer &&/|| over and/or.
@shmdt
shmdt / Encryptable
Last active November 7, 2019 10:11
module Encryptable
def encrypt(key)
crypt.encrypt_and_sign(key)
end
def decrypt(key)
crypt.decrypt_and_verify(key)
end
private
@ruslan-oliinyk
ruslan-oliinyk / env_variables.md
Last active May 27, 2021 10:08
How to use the same variables inside Ruby ​​and JS code at the same time

How to use the same variables inside Ruby and JS code at the same time

Prerequisites:

  • Ruby 2.3+
  • Rails 5.1+
  • Webpacker 4.x.x
  • Node.js 8.16.0+
  • Yarn 1.x+
@iscle
iscle / gist:66e946553e74a883b4494d3b6df0ee82
Last active October 26, 2025 14:04
Install python2.7 on Ubuntu 23.04 as "python"
wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
tar xzf Python-2.7.18.tgz
cd Python-2.7.18
sudo ./configure --enable-optimizations
sudo make altinstall
sudo ln -s "/usr/local/bin/python2.7" "/usr/bin/python"