React tutorial on adding a minimum loading delay to prevent spinner flickering when fetching data, using a throttle hook.
Tag: Tutorial
Avoid data corruption when writing files by syncing to disk. Learn about the risk and solutions in Python and Rust with code examples.
Tutorial on using Google Sheets to manage i18n translations for web projects (React Native focus), with a Node.js script to generate JSON files.
C# tutorial on partial JSON deserialization using System.Text.Json.Nodes.JsonNode to extract specific data without full deserialization.
A guide for backend engineers on learning React in 2024, covering setup, fundamentals, web tech, deployment, and testing.
A guide to Docker fundamentals, covering core concepts, Dockerfile instructions, building images, and running containers.
This Excel tutorial demonstrates how to use the FILTER formula to extract data from a table while excluding headers. This formulas also filters based on a condition (e.g., non-blank status).
Learn how to URI encode strings and query parameters in C# using
System.Uri.EscapeDataString
. This tutorial provides code examples for basic encoding and within an ASP.NET integration test.
Argues that REST APIs should return 204 (No Content) or an empty response instead of 404 (Not Found) when a resource is null, citing reasons like cleaner error logs and simpler client-side handling.
A tutorial on adding API versioning to ASP.NET Core endpoints for .NET 8 and .NET 9, covering setup with OpenAPI/Scalar and Swagger, and providing code examples for implementation.
Learn multiple methods to run Linux processes in the background and detach them from the terminal using commands like
disown
, nohup
, and dex
, with code examples.
A concise guide on installing Ruby on macOS using Homebrew,
ruby-install
, and chruby
with zsh
commands, addressing common issues with other tutorials.
Provides a Python function using
glob
to recursively find files with multiple extensions, highlighting robustness with glob.escape
and efficiency with generators, and critiquing common online solutions.
Tutorial on how to SSH into a VirtualBox VM by configuring port forwarding, installing openssh-server, and setting up password-less SSH from Windows or Linux.
Tutorial on installing macOS 12 Monterey on VirtualBox on Windows 11 (AMD CPUs), covering setup, configuration, installation steps, and troubleshooting.
C# tutorial on adding items to a MongoDB Dictionary field using the $push operator, demonstrating the array-of-documents approach.
Tutorial on implementing a QR code scanner in React Native using
react-native-camera-kit
, covering installation, platform configuration, and basic usage.
Explains how to access global JSON serializer options in ASP.NET Core using dependency injection for consistent serialization/deserialization outside of controllers.
Learn how to integrate Razor Pages into your ASP.NET Core Web API project to serve dynamic HTML content. This tutorial covers necessary configurations in Program.cs and demonstrates creating a basic HTML page with Razor syntax.
Demonstrates returning HTTP error responses with strongly-typed responses in ASP.NET Core using ActionResult for validation and authorization.
Tutorial on making Windows apps start on login by adding a registry value, including the registry key and a Python code example for programmatic control.
Tutorial on serving embedded resources in ASP.NET Core for debugging/simple scenarios, covering .csproj configuration and C# examples for accessing resources.
In .NET 9, please use Scalar. Add a dark theme to your ASP.NET Core Swagger UI. This guide provides two methods: serving a CSS file from wwwroot or using an embedded resource.
Configure ASP.NET Core routes to automatically follow method names using
[Route("[controller]/[action]")]
on the controller, reducing the need for individual route decorators and streamlining API development.
Since my yt-dlp propaganda on YouTube is getting many views, I thought I’d create this article and a future video on how to use yt-dlp to download audio from websites, primarily YouTube.
Troubleshooting
For most errors like 403: Forbidden, try upgrading yt-dlp.
pip install --upgrade yt-dlp
Installing yt-dlp
-
winget install yt-dlp
choco install yt-dlp
scoop install yt-dlp
-
brew install yt-dlp
-
-
sudo pacman -Syu yt-dlp --noconfirm
-
A concise tutorial on implementing JWT authorization in ASP.NET Core, with code examples for configuration, setup, token generation, and securing API routes.
A concise step-by-step tutorial with screenshots on how to add a directory to the PATH environment variable on Windows using the graphical interface.
Learn how to implement logging and use tracepoints in your Uno Platform applications for effective debugging and monitoring.
A fast Python method to convert XLSX files to CSV on Windows using
win32com.client
, requiring Microsoft Excel. Includes a Python function and basic command-line usage.
Get your local area network (LAN) IPv4 address using Python. This post provides a function compatible with both Windows and Linux/macOS.
Implement hyphen-separated (kebab-case) routes in ASP.NET Core 7.0 by creating a custom parameter transformer and adding it to your MVC conventions.
Learn how to serialize enums as strings in ASP.NET Core for consistent JSON handling on both the backend and client-side using
JsonStringEnumConverter
.
Handle optional JSON fields and serialize enums as strings in ASP.NET Core. Configure
JsonSerializerOptions
globally or use attributes for precise control over JSON output.
Configure your ASP.NET Core Web API project for debugging in Visual Studio Code using a custom
launch.json
file, enabling a native development experience.
Learn how to configure systemd services to be started, stopped, and restarted by a non-root user without requiring a password using sudoers.
Implement a custom titlebar in your Tauri and ReactJS application, including handling window controls, translations, and ensuring rounded corners on Windows 11.
This post provides a tutorial on manipulating JSON data in Rust, specifically within the context of the Rocket web framework using
rocket::serde::json
(which wraps serde_json
). It demonstrates how to work with arbitrary JSON using serde_json::Value
and how to define and manipulate JSON with Rust structs using #[derive(Serialize, Deserialize)]
and std::borrow::Cow
for flexible string handling. The post includes examples for both GET and POST requests.
Learn how to make network requests in Rust using the
reqwest
crate, handle JSON responses with serde_json
, and integrate requests within a Rocket web framework backend.
Get started with Rust programming by learning how to set up and manage projects using Cargo, including installation, project initialization, basic code, and compiling/running.
A guide for Windows developers to set up their environment and contribute to Monero projects like
monero
or monero-gui
without a Linux VM, covering prerequisites, VS Code setup, dependency installation, building, and contributing.
Troubleshoot and fix the ‘unable to get local issuer certificate’ SSL error when making HTTPS requests in Python, often caused by missing intermediate certificates in the server’s chain.
This post provides various tips for React development, covering topics such as optimizing state updates with objects, using React Fragments instead of redundant divs, defining props in component parameters using object destructuring, organizing Context Providers with a
Providers.jsx
component, checking variable types, using a useCookie
hook for simple storage, understanding the purpose of useLayoutEffect
, using useRef
for persistence, and ignoring variables from array destructuring.
This post provides useful JavaScript code snippets for common tasks, aiming to save developers time. It includes functions for converting date and time formats (YYYYMMDDHHMM to Date and vice versa, YYYYMMDD to Date and vice versa), and a utility function for accurately determining the true type of a JavaScript object. The snippets are presented with code examples for easy implementation.
Design document for creating a monero processor, based on the payment processor I implemented on lenerva.com. These days, I’d recommend spinning up monero-pay on a server, although support for mempool webhooks is a missing feature.
This post explains JavaScript ES6 imports, contrasting them with NodeJS
require
. It details importing default exports (without braces) and named exports (with braces), including renaming imports. It also covers mass importing and exporting using index.js
files and the import * as
syntax, providing code examples for each concept.
Create mobile-responsive designs for websites using HTML and CSS (and React?). Meta tags, CSS media queries, and desktop-first CSS design.
We can create a Monero stagenet wallet using the command-line interface (CLI) on Windows and Unix-like systems, which avoids a bug in the GUI that prevents stagenet wallet creation after using a mainnet wallet.
A collection of Bash and Linux helper scripts and concepts. It covers Bash argument parsing with flags (alternative to getopts), conditional logic, and loops. Includes snippets.
Groovy code snippets for Jenkins, for example how to safely abort outdated builds and retrieve build logs.
A concise Bash quickstart guide. It provides links to a Bash scripting cheatsheet and other Bash helpers. Key examples include the shebang (
#!/usr/bin/env bash
), iterating through a literal array using a for
loop, and demonstrating C-like increment logic with ((counter++))
.