Skip to content

Instantly share code, notes, and snippets.

View dstoianov's full-sized avatar
🏠
Working from home

Denys Stoianov dstoianov

🏠
Working from home
  • Berlin, Germany
  • 18:28 (UTC +01:00)
View GitHub Profile
@dstoianov
dstoianov / MultiValueMapConverter.java
Last active October 8, 2021 20:01
MultiValueMap and Transformer
import java.util.*;
public class MultiValueMapConverter {
public static void main(String[] args) {
/*
0 -> [0]
1 -> [0]
2 -> [1]
@dstoianov
dstoianov / git branch
Created March 25, 2019 11:35
git branch
git config --global pager.branch false
https://stackoverflow.com/questions/48341920/git-branch-command-behaves-like-less
@dstoianov
dstoianov / upgrade_pg.sh
Created March 24, 2019 11:32 — forked from edib/upgrade_pg.sh
Upgrade PostgreSQL 9.3 to 9.6 on Ubuntu 16.04
sudo apt-get install postgresql-9.6 postgresql-server-dev-9.6 postgresql-contrib-9.6 -y
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS hstore;'"
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'"
sudo systemctl stop postgresql
sudo su - postgres -c '/usr/lib/postgresql/9.6/bin/pg_upgrade -b /usr/lib/postgresql/9.3/bin -B /usr/lib/postgresql/9.6/bin \
-d /var/lib/postgresql/9.3/main/ -D /var/lib/postgresql/9.6/main/ \
-O "-c config_file=/etc/postgresql/9.6/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" --link'
sudo apt-get remove postgresql-9.3 -y