ytyng.com

Latest Articles

Page 7
kubernetes
2022-06-19 11:32 (4 years ago)
Updating Kubernetes Ingress from extensions/v1beta1 to networking.k8s.io/v1

Migrate a Kubernetes Ingress from `extensions/v1beta1` to `networking.k8s.io/v1`, with YAML examples. The `backend` field structure must be rewritten.

DockerLinux
2022-06-12 02:55 (4 years ago)
When Running Docker via SSH and Encountering "the input device is not a TTY" Error, Add the -t Option

When trying to use the `docker run` command with SSH arguments and encountering the message "ssh docker run the input device is not a TTY," you can resolve the issue by adding the `-t` option to the SSH command.

Shellscript(Bash/Zsh)
2022-05-28 07:29 (4 years ago)
If the File is Older Than the Specified Date, Do Something in Shell Script

How to use the `date` command to retrieve the timestamp of a file's last modification date. This article was written to determine tasks that have not been processed for a certain period and to issue an alert when opening the terminal on a Mac.

kubernetes
2022-04-22 13:24 (4 years ago)
Writing Host Aliases in Kubernetes Manifests

Bottle's SimpleTemplate basics, plus how to switch to Jinja2 / Mako templates inside Python's bottle framework.

PHP
2022-04-20 00:34 (4 years ago)
Posting XML with PHP using Zend Framework HTTP Client

Build XML with SimpleXML in PHP and POST it via Zend Framework's HTTP Client, with a complete code sample.

Python
2022-04-02 05:32 (4 years ago)
Digital Signage: Python Selenium Script to Launch Chrome in Kiosk Mode

A script to open a website and log in to Google using Python Selenium

Django
2022-03-21 08:57 (4 years ago)
To Create a Request in Django Unit Tests, Retrieving the wsgi_request from the Response is Convenient

When creating unit tests in Django, there are times when you need a Request (WSGIRequest).

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.