ytyng.com

Latest Articles

Page 10
nginx
2020-05-06 14:24 (6 years ago)
Outputting Request Headers in Nginx Logs

Output every request header and response info to the nginx access log via a custom `log_format`, with an Ansible playbook to deploy it.

2020-02-12 06:35 (6 years ago)
The App Crashes When Using FlutterDownloader.initialize() with flutter_downloader

While using flutter_downloader 1.3.4 with Flutter, the app crashes at await FlutterDownloader.initialize() when debugging from Android Studio. However, the app does not crash when launched from XCode. If anyone knows how to fix this, please let me know.

kubernetes
2020-01-14 06:34 (6 years ago)
HTTP 413 Error When Uploading Files in Kubernetes Environment

Open a specific 1Password item directly from the Mac terminal with `open 'onepassword://...'` — also how to get the item URL.

nuxt
2020-01-02 11:53 (6 years ago)
When Using Nuxt Axios Proxy Mode, Axios Config's httpsAgent Injection Cannot Handle Self-Signed Certificates on the Proxy Server

Fix `ssl.SSLCertVerificationError` in Django `send_mail` — check `EMAIL_USE_SSL` / `EMAIL_USE_TLS` and certificate trust chain.

2019-12-30 12:27 (6 years ago)
対応方法 for Cross-Origin Session Cookies Not Being Sent After Upgrading to Django 3

Hide apps that an `is_staff` user has no permission for in the Django admin — override `get_app_list` to filter the visible app list.

Django
2019-12-25 06:14 (6 years ago)
Upgrading to Django 3: from_db_value() missing 1 required positional argument: 'context' Error Occurs

Fix `from_db_value() missing 1 required positional argument: 'context'` on custom Django fields after upgrading to Django 3 — adapt to the removed `context` arg.

Android
2019-09-13 10:45 (6 years ago)
When Running `flutter build apk`, Gradle Task `assembleRelease` Failed with Exit Code 1 and APK is Not Created

Change a DRF (Django REST framework) serializer's datetime output format away from ISO — use `format=` or override `to_representation`.

Android
2019-09-09 05:57 (6 years ago)
What to Do When Android Emulator's Network Connection Stops Working

1. Terminate the emulator 2. From AVD Manager, select Cold boot now

2019-06-30 23:09 (7 years ago)
Docker on Ubuntu Won't Start

The `/usr/bin/dockerd` binary was missing. → Replaced `/usr/bin/docker` with `/usr/bin/docker-ce`. → The service started successfully.

2019-06-29 05:23 (7 years ago)
Comparison of Docker Base OS Image Sizes 2019-06-29

Basic patterns for combining `async/await` with `Promise`-based functions in JavaScript, and the error-handling pitfalls to watch for.

Django
2019-06-22 13:07 (7 years ago)
When Django's DecimalField quantize Fails on Alpine Linux

Stop PyCharm / JetBrains project view from opening files on a single click — how to require a double click instead.

2019-06-18 23:59 (7 years ago)
If the "Jump to Source" Shortcut (Command + Click) Stops Working in Jetbrains Editor

If `Command + Click` (Jump to Source) stops working in a JetBrains IDE (PyCharm / IntelliJ), here are the settings to re-check.

2019-05-18 16:14 (7 years ago)
When Pods Fail to Start with ContainerCreating (FailedMount) in Kubernetes

When a Kubernetes Pod is stuck in `ContainerCreating` with `FailedMount` events, check Secret / ConfigMap / PVC references and RBAC — common root causes.

Django
2019-03-25 23:57 (7 years ago)
How to Use freezegun in Django Tests to Set the Date One Day Ahead with USE_TZ=True

Use freezegun in Django tests so that "one day later" or relative offsets work correctly under `USE_TZ=True`.

DjangoPHP
2019-03-14 15:19 (7 years ago)
Using Vue.js Webpack Dev Server Proxy for Social Provider Authentication with Django + Python Social Auth

When developing with Vue, if you are running a webpack dev server and using Django for the API backend along with Django's authentication using Python social auth and an external Auth provider, you may encounter an issue.

css
2019-02-10 06:23 (7 years ago)
Displaying Differences in CSS Styles: A Memo

Auto-redirect logged-in users to an internal app from a Django Allauth SocialAccount flow — customize `LOGIN_REDIRECT_URL`.

2019-02-04 04:15 (7 years ago)
Differences in Behavior with and without Await in Functions that Create and Return Promises Inside JS Promises

Here's an English translation of the summary for the Japanese blog article: "Whether it gets resolved or not: A JavaScript code example." If you need further assistance or more details, feel free to ask!

2018-12-04 12:21 (7 years ago)
Samba AD DC Malfunction -> Stopping slapd Resolved the Issue

System packages (`libmysqlclient-dev` etc.) and env vars needed when Python's MySQLdb fails with `mysql_config not found`.

Python
2018-10-11 12:31 (7 years ago)
Downloading Files with Requests Using Selenium Webdriver Session Cookies

Pass a logged-in session cookie from Selenium WebDriver into `requests` to download files that require a browser-bound session.

2018-09-27 03:26 (7 years ago)
Rebuild Python3.5 to Fix pip install uwsgi Error on Ubuntu18

Override the URL patterns (`urls.py`) in a Django test to inject a test-only view — use `@override_settings(ROOT_URLCONF=...)`.