Fading Coder

One Final Commit for the Last Sprint

Deploying Django 1.8.2 with uWSGI and Nginx on macOS

Configuring uWSGI Installation Install uWSGI using pip: pip3 install uwsgi Verificasion You can verify the installaiton in two ways. Method 1: Using a simple WSGI application Create a file named wsgi_test.py with the following content: def simple_app(environ, start_fn): start_fn('200 OK', [('Content...

Configuring ALLOWED_HOSTS for Django Production Deployment

When setting DEBUG = False in Django's settings file, attempting to run the development server will result in an error. python manage.py runserver 8888 CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False. This error indicates that the ALLOWED_HOSTS configuration is mandatory when deb...

Establishing a Free NAT Service for Exposing Local Services to the Internet

Establishing a Free NAT Service for Exposing Local Services to the Internet NPC is a cross-platform, lightweight, and free tool for creating NAT tunnels, enabling access to internal network services from the public internet. Its client is only about 3.5 MB, requires no installation, and supports HTT...

Controlling Touch Handling in Flutter with AbsorbPointer and IgnorePointer

AbsorbPointer and IgnorePointer both prevent widgets in their subtree from reacting to pointer input (tap, drag, scroll). The difference lies in how they partiicpate in hit testing: AbsorbPointer: removes its descendants from hit testing but is itself still hit. Encestors can receive the event; widg...

Consistent Hashing with and without Virtual Nodes in Java

A consistent hash places both data keys and server identifiers in to the same circular hash address space. Treat the hash output as a ring from 0 to 2^32−1. Each server is mapped to a point on the ring using a hash of its identity (for example, IP:port). To route a key, hash the key and walk clockwi...

Converting MemoryStream Content to and from Strings in .NET

Working with in-memory streams often involves turning byte data into text and vice versa. The key points are: Always use the same text encoding for writing and reading. Reset or manage the Position of the stream before reading. Be careful when disposing StreamReader/StreamWriter; use leaveOpen when...

Capturing Android Screenshots and Screen Recordings with ADB

Two practical ways to grab images and videos from an Android device: Mirror the phone display to a computer and use desktop tools for screenshots and GIFs Use ADB commands (no UI mirroring required) Both approaches assume USB debugging is enabled and ADB is installed. Option 1: Mirror to Desktop and...

Resolve PhpStorm "Interpreter is not specified or invalid" on WAMP (Windows)

Symptom PhpStorm displays: "Interpreter is not specified or invalid. Press ‘Fix’ to edit your project configuration." This occurs when the IDE cannot locate a valid PHP CLI executable or when the debugger extension is missing from the selected runtime. Target environment Windows with WAMP installed...

Installing CocoaPods on macOS Catalina (10.15) Using a User-Managed Ruby

System Ruby on macOS 10.15 frequently fails to build native gems required by CocoaPods (for example, ffi), leading to errors like: ERROR: Failed to build gem native extension checking for ffi.h... no You have to install development tools first The reliable approach is to install your own Ruby and us...

Efficient Usage of HTTP Client in IntelliJ IDEA

IntelliJ IDEA incorporates a versatile HTTP client tool, enabling developres to interact with RESTful services and APIs effectively with in the editor. This functionality streamlines workflows, replacing tools like Postman or JMeter for such tasks. Setting Up HTTP Request Files To begin, create a re...