Skip to content

Instantly share code, notes, and snippets.

View EvGe22's full-sized avatar
🤔

Illia Strelnykov EvGe22

🤔
View GitHub Profile

Network

We need a global docker network in order to communicate between docker-compose setups on different hosts

Step 1: Install and run Consul (as a key-value storage for docker)

https://www.consul.io/intro/getting-started/install.html

Step 2: Edit docker configuration (on each docker host)

@dmytrotkk
dmytrotkk / rails_error_handling.md
Created November 8, 2017 14:42
Handling errors in Rails with ActiveSupport

Handling errors in Rails with ActiveSupport

Rails provide a clean way to rescue exceptions in a controller with a defined method.

Let's suppose that you have a class with method create that could raise ActiveRecord::RecordInvalid exception:

class ExampleController < ApplicationController

    def create
@dmytrotkk
dmytrotkk / rails_lib_services.md
Created November 14, 2017 13:07
Rails app: Organizing `lib` directory with static services

Organizing lib directory with static services

base_service.rb
    module Core end

    module Core::BaseService
 extend self
@innat
innat / Path-Analysis-Neo4j-Cypher.md
Last active July 6, 2022 01:38
Path Analytics with CYPHER.

Viewing the graph

match (n:MyNode)-[r]->(m)

return n, r, m

Finding paths between specific nodes:*