ytyng.com

Latest Articles

Page 7
2022-02-04 07:45 (4 years ago)
When Installing reportlab in Python on Alpine, It Results in "Not a directory: '/dev/null/.reportlab_mods'"

Include something like `ENV HOME=/var/app` in the Dockerfile. The directory should be an appropriate one with the necessary permissions.

kubernetes
2022-01-26 03:43 (4 years ago)
Setting Timeout Period for Kubernetes Nginx Ingress

Notes on using `pipenv install --system --skip-lock` to install dev versions without strict locking, and how to run without a Pipfile.lock.

Pythonmac
2022-01-03 11:15 (4 years ago)
When pipenv lock Fails on M1 Mac

Fix `pipenv lock` failures on M1 (Apple Silicon) Macs — wheels for `grpcio` / `cryptography` may not exist on arm64, so use Rosetta or pin compatible versions.

AndroidFlutter
2021-12-26 13:14 (4 years ago)
Building an Android App with Flutter and Enabling App Launch from https:// URLs Using AppLinks

Make AppLinks (launching the app from an https:// URL) work for a Flutter Android build — keystore signing, getting the SHA256 fingerprint, and Digital Asset Links setup.

Android
2021-12-26 03:09 (4 years ago)
When the SHA256 of the Keystore is Not Displayed with Keytool During Android App Development

If `keytool -list` does not show the SHA256 fingerprint of an Android keystore, you need the `-v` flag and a newer JDK — here are the details.

Django
2021-12-11 13:51 (4 years ago)
If you see "cannot import name 'ugettext_lazy'" in Django, Django 4.0 might be installed

Here is the solution for resolving the ImportError: cannot import name 'ugettext_lazy' from 'django.utils.translation' that occurs when running manage.py hoge in Django.

kubernetes
2021-12-11 13:28 (4 years ago)
Easily Rolling Restart Kubernetes Pod (Pod Deletion Command)

When `kubectl rollout restart` makes Pods take too long to restart, check `terminationGracePeriodSeconds` and any preStop hooks — both are common bottlenecks.

mac
2021-12-11 12:11 (4 years ago)
When Notifications Don't Appear Only When Connecting an External Display with DisplayLink on an M1 Mac

When using a DisplayLink external display on an M1 Mac, system notifications stop appearing. Workaround: route notifications to the built-in display instead.

2021-12-11 11:09 (4 years ago)
Installing Cryptography (cffi) on M1 Mac

Fix `pip install mysqlclient` failing on macOS with `clang: error: -lzstd` — `brew install zstd` or add the right `LDFLAGS`.

2021-12-04 06:04 (4 years ago)
Building x86 Docker Images on an M1 Mac

Fix `no space left on device` build failures in Docker Desktop on macOS — grow the Docker.raw disk allocation or run `docker system prune`.

2021-11-27 09:43 (4 years ago)
Installing Node with nodebrew on an M1 Mac

Install Node.js on an M1 (Apple Silicon) Mac using nodebrew — install nodebrew via Homebrew and run `nodebrew setup`, step by step.

2021-11-27 09:07 (4 years ago)
When Installing python mysqlclient, ld: library not found for -lzstd Error Occurs

When encountering the error "ld: library not found for -lzstd" during the installation of python mysqlclient, try running commands like `brew install openssl`.

DjangoMySQL
2021-11-14 11:10 (4 years ago)
I removed NO_ENGINE_SUBSTITUTION because I got 'Lost connection to MySQL server during query' in Django

If a Django MySQL connection still hits 'No DB engine substitution' despite setting `ENGINE` to `django.db.backends.mysql`, here is the root cause and fix.

Python
2021-11-08 05:52 (4 years ago)
How to Resolve Errors When Installing google-crc32c Version 1.1.3 or Higher on Alpine with Python

When installing `google-crc32c` ≥1.1.3 on Alpine Linux fails to build, work around it by setting CFLAGS to enable SSE4.2 explicitly.

AWSPython
2021-10-15 11:53 (4 years ago)
Resolving UnsupportedProductError in Python ElasticSearch When Using AWS ElasticSearch

Format a USB stick as FAT32 + MBR on a Mac — explicit MBR via `diskutil eraseDisk` arguments.

2021-10-11 09:25 (4 years ago)
Creating a Kubernetes Secret from an Env File

When saving secret information locally in a file named .env and registering it with Kubernetes:

Python
2021-10-10 09:45 (4 years ago)
Creating and Posting XML with Python

Replace legacy log analyzers (Webalizer / Analog) with GoAccess for Apache / nginx access logs — sample configuration and example output.

2021-08-26 10:48 (4 years ago)
When Your MacBook Pro Intel Suddenly Slows Down (After Standby, etc.)

When an Intel MacBook Pro suddenly becomes slow after waking from standby, check and tune the `hibernate` / `standby` modes with `pmset`.

2021-08-20 12:27 (4 years ago)
A Server that Returns Website Screenshots Using Headless Chromium with Bottle and Gevent

Build a tiny HTTP server in Python (bottle + gevent) that takes a screenshot of any URL using headless Chromium and returns it as an image.

Flutter
2021-08-08 08:43 (4 years ago)
Downgrading Flutter SDK to Version 1.x

Downgrade Flutter from v2 back to v1 — use `flutter downgrade` and how to realign dependent package versions with the older SDK.