ytyng.com

Latest Articles

Page 8
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 (5 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 (5 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 (5 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.

2021-08-07 07:03 (5 years ago)
When Connecting to a MySQL 5.7 Server Using a MySQL 8.0 Client, Charset Specification Cannot Be Done from the Client

When a MySQL 8.0 client connects to a MySQL 5.7 server, the client overrides charset to utf8mb4 and breaks Japanese on a latin1 server — here is the fix.

Windows
2021-07-13 12:33 (5 years ago)
A Simple Method for Creating Digital Signage with Websites (HTML+JS) on Windows

Creating a dashboard and advertisement slideshow as a web application on a website, and displaying it on Windows digital signage.

Python
2021-06-09 04:24 (5 years ago)
Wait Until the Element Disappears with Puppeteer (Pyppeteer)

Here's an introduction to a code snippet that waits for an element to disappear, using Pyppeteer, which is Python's version of Puppeteer. The same approach should work similarly in Puppeteer's JavaScript version.

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.