Recent Posts
Posting to WordPress with Axios and TypeScript: A Step-by-Step Guide
When building web applications or content management tools, there are often situations where we need to post content to WordPress programmatically. By tapping into WordPress’s REST API, this process becomes highly efficient. In this guide, I’ll show you how to use axios and TypeScript to post content to a WordPress site. The approach here leverages
Parsing Connection Strings in Python
Connection strings are central to working with databases, APIs, and other systems where authentication, schema, and server details need to be specified. A connection string combines these details into one, convenient string—like a condensed map to the exact data you’re trying to reach. However, while a connection string packs a lot of essential information, sometimes
Securely Handling Sensitive and Non-Sensitive Inputs in Python
When working with Python applications, managing environment variables for things like passwords, API keys, and other configurations is essential. Environment variables keep sensitive information secure and flexible, allowing you to adjust configurations without modifying your code. But what if the necessary environment variable isn’t set, or you want an alternative, like a CLI prompt, to
What is the difference between Interfaces and Type Aliases in TypeScript
When working with TypeScript, one of the fundamental tasks is defining the structure of data. This is where interfaces and type aliases come into play. While they may look similar at first glance, they have distinct characteristics and use cases that can make or break the flexibility and maintainability of your code. Today, I’ll share
Command-Line Arguments in Python with argparse
When it comes to writing versatile and user-friendly Python scripts, knowing how to handle command-line arguments is invaluable. These small, powerful tools enable users to control how a script behaves without modifying code. Python’s argparse library is built precisely for this purpose, and it simplifies the process significantly. In this guide, I’ll walk you through
Playing Base64-Encoded PCM Audio in a Web Browser
Handling audio in a browser becomes tricky when dealing with non-standard formats like raw PCM. In this post, I’ll walk through how I worked with 24 kHz, 16-bit PCM audio encoded in Base64 and made it playable using the <audio> element and TypeScript. Browsers cannot play raw PCM directly, so the goal is to wrap