Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Tuan Nguyen uuhnaut69

🎯
Focusing
  • Viet Nam
View GitHub Profile
@uuhnaut69
uuhnaut69 / create-and-fill-up-table.sql
Created Nov 19, 2020 — forked from ololobus/create-and-fill-up-table.sql
Create large ~1 GB random dataset in PostgreSQL
View create-and-fill-up-table.sql
CREATE TABLE large_test (num1 bigint, num2 double precision, num3 double precision);
INSERT INTO large_test (num1, num2, num3)
SELECT round(random()*10), random(), random()*142
FROM generate_series(1, 20000000) s(i);
EXPLAIN (analyse, buffers)
SELECT num1, avg(num3) as num3_avg, sum(num2) as num2_sum
FROM large_test
GROUP BY num1;
@uuhnaut69
uuhnaut69 / Vagrantfile
Created Nov 19, 2020 — forked from kikitux/Vagrantfile
Vagrantfile, multi machine with ssh password less and hostname over private network.
View Vagrantfile
numnodes=2
baseip="192.168.10"
#global script
$global = <<SCRIPT
#check for private key for vm-vm comm
[ -f /vagrant/id_rsa ] || {
ssh-keygen -t rsa -f /vagrant/id_rsa -q -N ''
}
View Install-pgbackrest-dev-env.md

Get Started

Master configuration

Setup Ubuntu Bionic 18.04

vagrant init ubuntu/bionic64
View Postgres-Hand-On-Notes.md

Get Started for Mac OS

Install Vagrant

Download & install vagrant here.

Start Vagrant

mkdir example && cd example 
vagrant init centos/7 
View Roaring-Bitmap-On-Postgres-Installation.md

postgres-roaring-bitmap-extension-installation-note

A note about installtion roaring bitmap extension for Postgres. This tutorial using for Postgres App

Installation

  • Install Postgres App (ver 10, 11, 12)

  • Go to directory Postgres App location (The url maybe difference depend on your installation by homebrew or using Postgres App)

View apache-kafka-productivity-hacks.md

I've been working with Apache Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

View Mysql-binlog-docker-compose.md
version: "3.7"

services:
  mysql:
    container_name: mysql
    image: mysql:5.7
    command: ["mysqld", "--log-bin=mysql-bin", "--server-id=223344", "--binlog_format=row", "--expire_logs_days=1"]
    environment:
      MYSQL_ROOT_PASSWORD: root1234
View confluent-docker-compose.md
---
version: '2'
services:
  zookeeper:
    image: confluentinc/cp-zookeeper:5.4.1
    hostname: zookeeper
    container_name: zookeeper
    ports:
      - "2181:2181"
@uuhnaut69
uuhnaut69 / Sync-postgres-Elasticsearch.md
Last active Mar 5, 2020
A tutorial setup ETL Postgres CDC -> Kafka Connect -> ES
View Sync-postgres-Elasticsearch.md

postgres-cdc-kafka-connect-es-setup-guide

A tutorial setup ETL Postgres CDC -> Kafka Connect -> ES

Topology


                   +-------------+
                   |             |
                   |   Postgres  |
                   |             |
You can’t perform that action at this time.