Skip to content

Instantly share code, notes, and snippets.

View rgordeev's full-sized avatar

Roman Gordeev rgordeev

View GitHub Profile
@rgordeev
rgordeev / App.java
Created March 27, 2019 09:16 — forked from thomasdarimont/App.java
Spring Boot JPA example with custom Table based Identifier generation with PostgreSQL
package demo;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;
import org.springframework.boot.SpringApplication;
@rgordeev
rgordeev / combining-git-repositories.md
Created March 14, 2019 18:02 — forked from msrose/combining-git-repositories.md
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.

@rgordeev
rgordeev / nginx.conf
Created January 21, 2019 11:00 — forked from atma/nginx.conf
Nginx + nodejs + socket.io websockets
# Add to nginx.conf http section
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
@rgordeev
rgordeev / gist:280e9870da623023ebff4a350001b30e
Created December 22, 2017 07:22 — forked from afair/gist:3803895
PostgreSQL and Pgpool Architecture

Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer

Thanks for stopping by!

PostgreSQL and Pgpool Architecture

@rgordeev
rgordeev / Dockerfile
Created July 19, 2017 12:51 — forked from juhamust/Dockerfile
Kurento Media Server with Docker and SSL support (WIP)
# stream oriented kurento
#
# VERSION 4.4.3
FROM ubuntu:14.04
MAINTAINER Patxi Gortázar <[email protected]>
RUN apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get install -y wget
@rgordeev
rgordeev / introrx.md
Created June 14, 2017 10:41 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@rgordeev
rgordeev / pyget2.py
Created November 29, 2016 16:14 — forked from benhutchins/pyget2.py
A python download accelerator
#!/usr/bin/env python
#
# pyget2.py
# A python download accelerator
#
# This file uses multiprocessing along with
# chunked/parallel downloading to speed up
# the download of files (if possible).
#
# @author Benjamin Hutchins
@rgordeev
rgordeev / install.md
Created May 30, 2016 21:35 — forked from kshvakov/install.md
Установка Postgres-CI

Требования

Для работы необходим PostgreSQL-server 9.5 и, более-менее "свежий", Docker

Настройка сервера баз данных

Т.к. app-server и worker работают в docker-контейнерах, то следует прописать его (докера) сеть в pg_hba.conf

host    all             all  172.17.0.0/24 password
@rgordeev
rgordeev / springer-free-maths-books.md
Created December 29, 2015 07:16 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links