Skip to content

Instantly share code, notes, and snippets.

View palaniichukdmytro's full-sized avatar
🎯
Focusing

Dmytro Palaniichuk palaniichukdmytro

🎯
Focusing
  • Lviv/LIsboa
View GitHub Profile
@kennetpostigo
kennetpostigo / Migrating.md
Last active June 2, 2021 17:44
How I migrated from ReactRouter v2 to v4

First couple things I thought about when migrating after reading the docs

So migrating my existing app wasn't as troublesome as I originally thought. First thing I did was take a look at my router and routes and figure try to make a mental model of all the files where I had nested routes in the existing app because those components/containers will contain {this.props.children}. So I need to replace those with the nested <Match /> components.

So just to give an example:

In v2:

<Router history={history}>
  <Route path="/" component={App}>
@kyptov
kyptov / rabbitmq_cheatsheet_ru.md
Last active February 11, 2024 21:18
RabbitMQ Cheat Sheet (russian)

Общие упрощенные понятия. Возможно существуют способы задать другое поведение нежели данное упощенное.

Понятия

  • producer - отправитель, программный код, который отправляет сообщение.
  • consumer - получатель, программный код, который должен получить сообшение.
  • exchange - обменник, функционал RabbitMQ, получает сообщение с заданными параметрами от отправителя и:
    • может сбросить(удалить) сообщение или вернуть отправителю (зависит от атрибутов сообщения),
    • может отправить сообщение в очередь,
    • может отправить сообщение в несколько очередей (сообщение будет скопировано для каждой очереди)
  • queue - очередь, функционал RabbitMQ, хранит все сообщения и раздает их получателям.
  • message - сообщение, содержит атрибуты необходимые RabbitMQ, а также данные для передачи от отправителя к получателю
@StephanHoyer
StephanHoyer / elasticsearch-example.js
Created September 29, 2015 10:56
Simple example how to use elastic search with node.js
'use strict';
var elasticsearch = require('elasticsearch');
var Promise = require('bluebird');
var log = console.log.bind(console);
var client = new elasticsearch.Client({
host: 'localhost:9200',
log: 'trace'
@mikaelbr
mikaelbr / destructuring.js
Last active April 25, 2024 13:21
Complete collection of JavaScript destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => [1, 2, 3];