ytyng.com

Latest Articles

Page 9
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.

mac
2020-11-30 05:37 (5 years ago)
Import the p12 Certificate from App Store Connect by Dragging and Dropping into Keychain Access.

Distinguish 'draft' vs 'published' state for a Mezzanine BlogPost while editing — handling in both Admin and templates.

Raspberry-Pikubernetes
2020-11-23 07:58 (5 years ago)
Installing k3s Kubernetes on Raspberry Pi (Raspbian)

Install k3s (a lightweight Kubernetes distribution) on a Raspberry Pi (Raspbian) and bring up a single-node cluster — step-by-step.

DjangoMySQL
2020-11-08 10:53 (5 years ago)
mysql django.db.utils.InterfaceError: (0, '')

If you encounter the django.db.utils.InterfaceError: "(0, '')" error When this error occurs intermittently during get operations depending on the table or record, it might be due to a mismatch in the connection character encoding.

DjangoMySQLPython
2020-10-11 02:52 (5 years ago)
NameError: name '_mysql' is not defined in Python (Django) (Especially During Local Development)

If a Django project that has been working until now fails to start after a long time with the following error: ``` version_info, _mysql.version_info, _mysql.__file__ NameError: name '_mysql' is not defined ```

Javascriptnuxt
2020-10-07 12:49 (5 years ago)
A TypeScript Decorator to Show a Toast When $axios.$get Fails in an Async Method with Nuxt

This article introduces a TypeScript decorator code that displays a toast notification when the $axios.$get method fails within an async method in a Nuxt.js application.

Django
2020-09-13 06:57 (5 years ago)
Starting Django on Docker Alpine Results in django.db.utils.OperationalError: (2000, 'Unknown MySQL error')

When running `python3 ./manage.py runserver 8080`, I encountered the error `django.db.utils.OperationalError: (2000, 'Unknown MySQL error')`. This error occurs when the `OPTIONS` setting includes `'charset': 'utf8mb4'`.

mac
2020-08-21 08:19 (5 years ago)
Logging in via Jump Host with i2cssh

Configure `~/.i2csshrc` so the `i2cssh` command can fan out SSH connections through a bastion / jump host to multiple servers.

mac
2020-07-24 05:36 (6 years ago)
mkmf.rb can't find header files for ruby (Error while trying to install i2cssh)

Resolve `mkmf.rb can't find header files for ruby` when installing the `i2cssh` Ruby gem — install `ruby-dev` (or `ruby-headers`) and retry the gem install.

2020-07-13 11:39 (6 years ago)
Python Script for Storing ECR Login Information as Kubernetes Secrets

Introduction to Python Script Code

2020-07-13 07:07 (6 years ago)
Git Checkout Using Partial Branch Name Matching

Pitfalls when running a local server with `php -S` on macOS Big Sur or later, and how to terminate SSL with a separate proxy.

2020-06-01 01:18 (6 years ago)
Upgrading to Ubuntu 20 Results in ERROR 2026 (HY000): SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol

I upgraded Ubuntu to version 20.04, and when I tried to connect to MySQL, I encountered the following error: ERROR 2026 (HY000): SSL connection error: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol. As a result, I was unable to connect to MySQL.

Django
2020-05-19 06:34 (6 years ago)
Manually Operating Viewsets in Django Rest Framework to Retrieve Serialized Data

Introduction to Python Code for APIView.

Django
2020-05-18 02:16 (6 years ago)
対応方法 When MySQL AutoIncrement Runs Out

MySQLdb._exceptions.OperationalError: (1467, 'Failed to read auto-increment value from storage engine') In Django, when you specify an implicit id, the above error occurs if the auto increment value reaches its upper limit.