ytyng.com

Latest Articles

Page 8
2021-03-30 12:05 (5 years ago)
When Using CharField in Django Admin list_filter, Adding Choices Makes It Faster

Why specifying `choices` on a Django `CharField` makes `list_filter` faster — it bypasses the DISTINCT query the admin runs to enumerate filter values.

Python
2021-03-30 11:44 (5 years ago)
The Specified Version Was Not Installed with Pipenv

Even though the Pipfile specifies ```plaintext [packages] ... Werkzeug = "<1.0.0" ``` running ```plaintext pipenv install --system --skip-lock --dev --deploy ``` installs version 1.0.1.

2021-03-21 12:08 (5 years ago)
Launch VSCode from a Flutter Windows App

Launch VSCode (`code.cmd`) from a Flutter Windows app via `Process.run`. Covers how to pass arguments and handle quoting issues correctly.

2021-03-20 13:05 (5 years ago)
Dart (Flutter) Dio Library Sends All HTTP Headers in Lowercase

Dart's `dio` HTTP client lowercases all request header names, which can break authentication against old servers that treat header casing as significant.

mac
2021-03-20 09:24 (5 years ago)
Formatting a USB Drive to FAT32 MBR on a Mac

Sometimes, USB memory sticks that have been used for creating OS installation media may have a corrupted partition table, making it impossible to format them using the "Disk Utility" app.

Flutter
2021-03-12 02:02 (5 years ago)
How to Communicate with a Server Using a Self-Signed Certificate (My Own CA) Without Errors in Flutter's HTTP Client

When Django uses multiple databases and `ForeignKey` cannot traverse across them — `router.allow_relation` behavior and raw SQL workarounds.

2021-03-07 02:45 (5 years ago)
If "Environment key 'es2021' is unknown" Occurs in Nuxt+Typescript

Fix `zlib`-related errors when `pip install mysqlclient` (old MySQL-python) — `brew install zlib` and add the right `LDFLAGS`.

kubernetes
2021-02-16 06:53 (5 years ago)
Starting Elasticsearch and Kibana on Kubernetes with analysis-icu Installation

Notes on porting a JAN code check-digit validation script from ASP.NET / JavaScript to PHP, with a working PHP sample.

kubernetes
2021-02-11 14:11 (5 years ago)
If Pods Do Not Start from Deployment in EKS, Warning FailedScheduling May Indicate Resource Insufficiency

Install ChromeDriver 126 on Ubuntu 22.04 and run Selenium against it — apt + manual download steps, plus matching the Chromium / Chrome version.

Docker
2021-02-10 00:38 (5 years ago)
Changing the Timezone to JST on Alpine Linux

Set the system timezone of Alpine Linux to JST (Asia/Tokyo), including how to do it inside a Dockerfile.

Dockermac
2021-02-10 00:25 (5 years ago)
No space left on device during Docker build on Mac despite having available storage

When building a Docker image on a Mac, you might encounter the "no space left on device" error. This can happen even when there seems to be enough storage space available, leaving you puzzled about the cause.

2021-02-09 12:09 (5 years ago)
Cannot Build Python's grpcio

Fix compile errors when installing Python's `grpcio` — workarounds for missing C++ headers and CFLAGS adjustments to make `pip install grpcio` succeed.

Python
2021-02-08 14:34 (5 years ago)
If You Can't Install Python Cryptography, Install Rust with rustup

Fix screen redraw issues when Mac Quick Look or Finder content is displayed on a DisplayLink-connected screen.

Linux
2021-02-01 02:17 (5 years ago)
Expanding LVM to Full Capacity

Inspect `django-redis` cached values directly from `manage.py shell` — both `cache.get` and the raw Redis client commands.

Django
2021-01-26 08:21 (5 years ago)
I want to add custom HTML to Django Admin Inlines

Insert a custom HTML snippet or help text into a Django Admin Inline formset (TabularInline / StackedInline) — implementation patterns.

Django
2021-01-20 11:10 (5 years ago)
Create Another Admin Site in Django

If you want to create a different URL for Django's Admin while keeping /admin/ intact: Create an instance using `from django.contrib.admin import AdminSite` and `site = AdminSite(name='staff')`.

2021-01-19 00:27 (5 years ago)
If Google Japanese Input Conversion is Slow on Mac Big Sur, Check Full Disk Access

Suppress the geckodriver log file in Selenium Firefox by setting `service_log_path` (or sending it to `os.devnull`).

kubernetes
2021-01-15 14:38 (5 years ago)
What to Do When Your Kubernetes Node Shows "The node was low on resource: ephemeral-storage"

Detect that an element does not exist with Pyppeteer — catch the `waitForSelector` timeout and return `None`.

2021-01-10 07:50 (5 years ago)
Display the Number of Upgradable Packages in Ubuntu (apt)

When you log in to Ubuntu via SSH, you see the following message: "10 packages can be updated. 5 updates are security updates."

MySQL
2021-01-01 12:28 (5 years ago)
Connecting to MySQL 8.0 with SSL Mode Disabled (ERROR 2026 (HY000): SSL Connection Error: Error Handling)

When trying to connect MySQL Client 8.0 to MySQL 5.6, DataGrip displays an error message: "[08S01] Communications link failure java.io.EOFException: SSL peer shut down incorrectly," and the connection fails.