Selasa, 23 Juli 2024

Rangkuman Query PostgreSQL

Check Max Connection
SHOW max_connections;
Query menampilkan total connection, active connection, idle connection, dan max connection di database postgresql
SELECT 
    count(*) AS total_connections,
    count(*) FILTER (WHERE state = 'active') AS active_connections,
    count(*) FILTER (WHERE state = 'idle') AS idle_connections,
    (SELECT setting::int FROM pg_settings WHERE name = 'max_connections') AS max_connections
FROM pg_stat_activity;

asdas
Continue reading...

Kamis, 04 Januari 2024

Error Git Push ke Repository

error: remote unpack failed: error VS403702: The push was rejected because one or more commits contain author email '1878631-awanz@users.noreply.gitlab.com' which does not match the policy-specified patterns.

git config user.email yournewemail@example.org

git commit --amend --reset-author

git commit --amend --reset-author --no-edit
Continue reading...

Kamis, 24 Agustus 2023

Cara menghapus Aplikasi di Ubuntu

 Ubuntu Software

APT Command

- Command list aplikasi yang terinstal
sudo apt list --installed
- Command untuk menghapus
sudo apt-get remove <nama_aplikasi> -y


snap Command

- Command list aplikasi yang terinstal
sudo snap list
- Command untuk menghapus
sudo snap remove <nama_aplikasi>

dpkg

- Command list aplikasi yang terinstal
dpkg --list
- Command untuk menghapus
sudo dpkg -r <application_name>
atau
sudo apt-get remove --purge <nama_aplikasi>

Cara Remove Dependencies

sudo apt autoremove 

Continue reading...

Kamis, 29 Desember 2022

Sabtu, 25 Juni 2022

Composer SSL certificate problem: unable to get local issuer certificate

Problem
curl error 60 while downloading https://repo.packagist.org/p2/picqer/php-barcode-generator.json: SSL certificate problem: unable to get local issuer certificate

Solution
composer config -g -- disable-tls false
Continue reading...

Kamis, 23 Juni 2022

Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease' doesn't support architecture 'i386'

Problem

N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease' doesn't support architecture 'i386'

Solution

Pertama buka file menggunakan gedit
sudo gedit /etc/apt/sources.list.d/pgdg.list

ubah menjadi
deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main

Lalu lakukan update kembali dan berhasil
sudo apt-get update



Continue reading...

Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key

Problem

W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://download.docker.com/linux/ubuntu/dists/focal/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

Solution

sudo mv /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/
Continue reading...