Posts

Showing posts from 2019

2023-09-13, Wednesday, Cloudy

新工上遇上了挫折。寫好的東西達不到標準需要別人執手尾了。雖然同事說沒關係,但反應了自己的不足。有時反省自己為何做事總是不好,為何別人有留意或想到的事情自己總是忽略。現在覺得是自己天生的思考模式問題,可能看多少書都沒用。或者自己應該更適合做地盤呢類工作,而唔係IT。

when you cannot ssh with key pair...

https://unix.stackexchange.com/questions/36540/why-am-i-still-getting-a-password-prompt-with-ssh-with-public-key-authentication

Install Apache Superset on Ubuntu 18.04

Open terminal. In terminal, run: (base) cbxdev@cbxdev-VirtualBox:~$ sudo apt-get install build-essential libssl-dev libffi-dev python3.6-dev python-pip libsasl2-dev libldap2-dev Create virtual environment (base) cbxdev@cbxdev-VirtualBox:~$ python3 -m venv venv (base) cbxdev@cbxdev-VirtualBox:~$ . venv/bin/activate Upgrade pip and setuptools to latest version. (venv) (base) cbxdev@cbxdev-VirtualBox:~$ pip install --upgrade setuptools pip Install Superset # Install Superset (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ pip install superset # Initialize the database (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ superset db upgrade # Create an admin user (you will be prompted to set a username, first and last name before setting a password) (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ export FLASK_APP=superset (venv) (base) cbxdev@cbxdev-VirtualBox:~/docker$ flask fab create-admin Username [admin]: User first name [admin]: User last name [user]: Email [admin@fab

To install ossp-uuid on postgres 10.7 on centos 7 from source

1. install missing lib yum -y install e2fsprogs-devel uuid-devel libuuid-devel 2. simple get into source folder(e.g. postgresql-19.7/contrib/uuid-ossp), then make && make install 3. Install in pgsql CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; 4. Test the function select uuid_generate_v4(); From: https://www.fengiling.com/blog/view/?id=612683

Running postgresql with docker

// Comment # Use postgres/example user/password credentials version: '3.1' services: db: image: postgres restart: always volumes: - /home/cbxdev/docker/postgresql/data:/var/lib/postgresql/data/pgdata ports: - 5432:5432 environment: POSTGRES_PASSWORD: example POSTGRES_USER: cbxdev PGDATA: /var/lib/postgresql/data/pgdata