Skip to content

Instantly share code, notes, and snippets.

View stadniklksndr's full-sized avatar

Sasha Stadnyk stadniklksndr

View GitHub Profile

WiW

eileencodes, kamipo

* activerecord
* activerecord/lib/active_record/persistence.rb

Inspecting

Inspect the instance method:

  • User.instance_method(:name).source_location => ["/app/models/user.rb", 2]
# Clear all jobs
* redis-cli flushdb
* Sidekiq.redis { |conn| conn.flushdb }
# Stats
* stats = Sidekiq::Stats.new
* stats.queues

ADD TO Gemfile

group :development do
  gem 'capistrano', '~> 3.8', '>= 3.8.1'
  gem 'capistrano-rvm', '~> 0.1.2'
  gem 'capistrano-rails', '~> 1.2', '>= 1.2.3'
  gem 'capistrano-rails-db'
  gem 'capistrano3-puma', github: 'seuros/capistrano-puma'
  gem 'capistrano-nginx', '~> 1.0'
  gem 'capistrano-upload-config', '~> 0.7.0'

Login to VPS

ssh root@vps_host_ip

Change vim Comment color

Open vimrc file
    sudo vim /usr/share/vim/vimrc

Add line below

Get Version

mysql --version

Install

sudo apt-get install mysql-server mysql-client libmysqlclient-dev

Delete

sudo apt remove --purge mysql-server mysql-client mysql-common
sudo apt autoremove

sudo rm -rf /var/lib/mysql*