ytyng.com

Latest Articles

Page 6
2022-10-25 00:04 (3 years ago)
Retrieve Google Spreadsheet Content as a List of Dictionaries using GAS

Shell script to launch Chrome on macOS with a fixed window size from the command line — combine `--window-size` and `--window-position`.

Django
2022-10-17 11:24 (3 years ago)
Manually Creating a Password Reset URL in Django AllAuth

Build a macOS Service (Quick Action) that sends `find` results to the clipboard via `pbcopy` — works back to Big Sur.

2022-10-10 01:47 (3 years ago)
Template Code for Starting an App with Python Bottle (and Combining with Vue CDN)

Here is a template code for creating a simple HTML application using Bottle.

Python
2022-10-09 02:16 (3 years ago)
Code for Creating a Logger When Making Python Command Line Tools

Build an OpenVPN server that routes all clients in a segment through the VPN — from CA cert issuance to distributing `client.ovpn`.

2022-09-30 00:50 (3 years ago)
Opening Slack Channel Links with Command Line, Raycast, and Alfred

Convert a Slack web URL into the slack:// scheme to open a specific channel directly from the command line, Raycast Quicklink, or Alfred.

Python
2022-09-19 07:31 (4 years ago)
Fixing the Issue of Separated Voiced Marks in Folder Names on Mac When Outputting from Python

Debug and work around `multipart/form-data` boundary issues during file upload in macOS WebKit (WKWebView / Safari).

Django
2022-09-16 10:11 (4 years ago)
After Updating Django, Migration Fails for oauth2_provider

Use `mkdir -p ... && cd $_` on macOS to chain create-and-enter reliably without race conditions.

Django
2022-09-12 12:21 (4 years ago)
Setting Up a Logger to Output Logs to the Console in Django

Summary of the blog post in English: "Django Logging Configuration: Output to Console Instead of File"

DjangoMySQL
2022-09-11 09:58 (4 years ago)
Tips for Solving the 2027 Malformed Packet Error in MySQL

Return a common post-login redirect target in Django Allauth without specifying a SocialAccount — how `LOGIN_REDIRECT_URL` behaves and how to override it.

nginx
2022-09-09 07:37 (4 years ago)
A Simple Configuration to Host Static Files with Alpine Nginx

Things to try when a Mac HDMI display occasionally freezes — change the refresh rate with `displayplacer`, reseat the cable, etc.

2022-09-09 05:32 (4 years ago)
Migrating Redash from Version 6 or Below to Version 7 to Prevent Launch Issues (Also Necessary for Transitioning from Version 8 to 9)

Why Google Japanese Input asks for 'Full Disk Access' on macOS Big Sur, and what happens if you decline the permission.

2022-09-08 00:44 (4 years ago)
Analyzing Apache Access Logs with GoAccess Instead of Webalizer or Analog

Workaround when PyCharm Python 3.6 Run/Debug Configurations fail to load native extensions like `fibers`.

Python
2022-09-05 00:49 (4 years ago)
If "pipenv install" Results in RuntimeError: location not created nor specified

Fix `pipenv install` failing with `RuntimeError: location not created nor specified` — remove the venv with `pipenv --rm` and let pipenv recreate it.

DjangoDockerPython
2022-09-03 11:03 (4 years ago)
Changed Django's Docker Environment from Alpine + uWSGI to Debian + Daphne → Ended up with uvicorn After All

Why switch a Django Docker image from Alpine + uWSGI to Debian + Daphne (ASGI), with example Dockerfile and Kubernetes manifest changes.

kubernetes
2022-08-19 10:51 (4 years ago)
Items to Check to Prevent Timeout for Slow Responses in Kubernetes Ingress + Uwsgi Configuration

Checklist of timeout settings (Ingress, uWSGI, Django, nginx) to verify so slow responses don't get cut off in a Kubernetes + uWSGI stack.

Python
2022-08-11 15:06 (4 years ago)
Three Workarounds for Failing to Install cryptography When Setting Up a Python Environment in an Alpine Linux Docker Image

Packages required (`apk add ...`) to `pip install cryptography` in an Alpine Linux Docker image, and how to handle common build errors.

Django
2022-08-06 02:09 (4 years ago)
Display a Warning When Attempting to Navigate Away with Unsaved Changes in Django Mezzanine's TinyMCE

If you are using version 4 of tinyMCE, you can add an onChange event in the setup option of tinyMCE.init.

2022-07-24 08:46 (4 years ago)
Creating a Terminal Menu Controlled by Arrow Keys in Python (Utilizing Escape Sequences)

Information on creating a terminal menu that can be navigated using arrow keys without using curses. There were many uncertainties, so I wrote this while referencing other sites. Thank you.

2022-07-20 04:10 (4 years ago)
Extracting Hard Bounce Email Addresses from Postfix Mail Logs with a One-liner

Extracting email addresses that have hard bounced from Postfix logs using a one-liner. Email sending must be stopped for addresses that have hard bounced.

kubernetes
2022-06-19 14:42 (4 years ago)
How We Managed to Retrieve Remote IP Addresses via Kubernetes Ingress

Make `X-Forwarded-For` / `X-Real-IP` reflect the real client IP through Kubernetes nginx-ingress instead of the cluster-internal IP.