postgresql docker: FATAL: role "root" does not exist

The Problem

When you use docker to run postgresql (ex, postgres:14.5-bullseye) and enabled healthcheck, you might get health status from docker compose ps, but you might see error messages in your docker log.

Sample docker-compose.yml:

Nginx 1.25.0 開始支援 HTTP/3 (QUIC)

其實二月就有嘗鮮版可以測試

不過正式釋出是昨天的事,不到 24 小時前。

Changes with nginx 1.25.0                                        23 May 2023

    *) Feature: experimental HTTP/3 support.
  • http://nginx.org/en/CHANGES

等了好久,終於要開始支援了。

記得寫研究所論文時就爬過 QUIC 程式碼、翻過 spec,找過缺陷問題,然後心心念念期待普及。直至今日。

bun (bun.sh) crash with error: IsDir. Reason and solution.

Tags: 

As bun sounds promising, I've been adapting it in my daily life for a better/alternative solution to npm.

The Pain

The pain But today I got error: IsDir in my new helloworld project for learning React.

使用 GCP 和 AWS 建立 TON 算力挖礦 (PoW) 及驗證節點 (PoS)

TON (The Open Network) 或 TONcoin,前身是 Telegram (通訊軟體)發起的 Telegram Open Network.

Miner 算力挖礦 - PoW

支援 GPU 加速挖礦。

AWS g4ad

AMD EPYC CPU + AMD Radeon Pro V520 GPU. - 較便宜、TON 挖礦效能好、CP 值高。 - ETH (ethash) hashrate 算力很低,不適合雙幣挖礦。

建立 instance 時,請確定選擇了用 Ubuntu 18.04,因為 AWS 只提供給 Ubuntu 18.04 的 GPU 驅動程式。

TON miner (PoW) and validator (PoS) on AWS and GCP

TON (The Open Network), or TONcoin, former Telegram Open Network founded by the instant messaging app Telegram.

Miner - PoW

We can use GPU for mining.

AWS g4ad

AMD EPYC CPU + AMD Radeon Pro V520 GPU.

  • Lower price, better TON mining performance, better C/P value.
  • ETH (ethash) hash rate is low, so not for dual mining.

Make sure to use Ubuntu 18.04, as AWS doesn't provide Ubuntu 20.04 drivers.

Fix Drupal 7 errors/warnings about count(), cache_get(), and each().

Tags: 

Upgrading PHP to 7.2 might break your Drupal 7.

Here are some error/warning examples and how to fix them.

HTTPS error, GitHub Pages with Custom domain

Got HTTPS error on my GitHub Pages hosted site with Custom domain GitHub msg github warning

Fixing by getting the latest GitHub Pages alias settings and update the records on Cloudflare. github resolving

Backport an Ubuntu package in 5 minutes.

Packaging software might sound scary, but backporting Ubuntu package is actually easy.
When you need some features or bugfix in a newer version of software, which exists in latest Ubuntu release, but need it to be running in your older release of Ubuntu, what you need to do is to port the software from latest Ubuntu to the version you want. And in this HowTo I'll guide you through.

  1. Install tools: sudo apt install ubuntu-dev-tools
  2. Set developer (YOU) info: export UBUMAIL="Your Name <[email protected]>"
  3. Use tool to backport backportpackage -w . the-package-name

Update CI data / database container image for data or database schema changes.

One of the projects I work on uses GitLab . We host our codes on GitLab, review codes and commits, and use GitLab CI to do all the CI auto-testing jobs before we merge branches.

Normally mock data for TDD Unit Test shouldn't be a difficult job, but once we need to do something more complicated, like searching relations in a graph database, or doing some Integration Test, it became a mess, no matter we put them in test codes or put them in separated files and load when needed:

  • updating hundreds of records in a thousands-rows mock dataset .
  • container stats and changes will not be kept across stages and jobs, so in every jobs and stages we need to load them again and again.
  • it takes time and resources to load data into database, and we don't want to wait them long.
  • wasting resources might cause global warming.

Reset password and unblock login for admin (or any account) in Drupal 8 with SQL query in MySQL or MariaDB

My Drupal 8 site got some problem and I restored it from an old backup.
The problem is, I forgot the password of admin account, and I don't have a working MTA (ex, Postfix Mail Transport Agent) on the server for sending password resetting mail.
The solutions to reset password and unblock the account in database directly.

Hope this HOWTO can save a tree and a kitten.

Pages

Subscribe to GeekyLog RSS