AllMyNotes Documentation
website·Indexed 30 days ago
https://arnewohletz.github.io/AllMyNotesA personal knowledge base covering software design principles (SOLID, DRY), design patterns (Singleton, Observer, Strategy, etc.), Python development guides including unittest.mock.Mock and pyenv, Sphinx extension tutorials, and network configuration for SSH and Proxy Jump.
What's inside AllMyNotes
- The Python Institute offers a tiered certification path for Python programmers. Free study resources are available at https://www.pythoninstitute.org/study-resources.
Overview of c’t-WIMage backup solution
WIMage is a backup solution provided by c’t for the main disk partition (C:\). It creates backups that are compatible with the Windows Setup Tool, allowing them to be transferred back onto hard disk partitions. It supports Windows 8.1, 10 (version 1703 and later), and 11 in both 32-bit and 64-bit variants.Overview of React styling options
React does not enforce a specific styling method. Developers can use various approaches depending on project needs, including:
- Inline styling
- External CSS files
- Sass
- CSS Modules
- Styled-components
- Tailwind CSS
Overview of Trivy vulnerability scanner
Trivy is a comprehensive security scanner used to detect vulnerabilities in container images, file systems, and Git repositories. Additionally, it scans for configuration issues and hard-coded secrets.Understand the Docker installation architecture
A Docker installation follows a client-server architecture consisting of two primary components:
- Docker Daemon: A service that runs on the host OS. It must run on Linux because it depends on specific Linux kernel features. The daemon manages Docker images and exposes a REST API.
- Docker CLI (Client): A command-line interface installed on the local OS (Linux, macOS, or Windows) that communicates with the Docker daemon via its REST API to manage containers.
In this ecosystem, the daemon acts as the server and the CLI acts as the client. Third-party clients for various programming languages can also interact with the daemon's API.
Inspect detailed process information and user rights
To retrieve comprehensive details about a process (such as executable path, version, and priority), pipeGet-ProcesstoFormat-List *. To see the user rights associated with a process, use the-Include-UserNameparameter, which requires an administrator console.# Get all detailed properties Get-Process PROCESS_NAME | Format-List * # Get user rights (Requires Admin) Get-Process PROCESS_NAME -Include-UserNameUnderstand Routing in React
Routing in React is the process of matching different URLs to different UI views (React components). This allows users to navigate between application screens using the browser URL while keeping the UI in sync with the current address.
Crucially, React does not include a built-in routing mechanism; it relies on third-party libraries. React Router is the most commonly used library for implementing this functionality.
Understand the purpose of Exception Handling in Java
Exception handling is used to manage errors that occur during program execution, particularly when the specific context of how an object will be used is unknown at the time of the class's development. Common error sources include:
- External file issues: Denied read/write access or hardware failure.
- Invalid user input: Operational errors by the end-user.
- Software bugs: Logic errors within the code.
Instead of implementing a generic error handler within a low-level class (like
File), which cannot know the specific requirements of every possible application, Java uses exception handling to propagate the error up the call stack. This allows the responsibility for error recovery to be handled by a method that possesses the necessary context and parameters to react correctly to the failure.Implement a Question and Options component structure
Create aQuestioncomponent that receives aquestionobject. To maintain a clean architecture, delegate the rendering of the multiple-choice options to a separateOptionscomponent. TheOptionscomponent iterates over thequestion.optionsarray to render a button for each available choice.// Options.js function Options({ question }) { return ( <div className="options"> {question.options.map((option) => ( <button className="btn btn-option" key={option}> {option} </button> ))} </div> ); } export default Options; // Question.js import Options from "./Options"; function Question({ question }) { return ( <div> <h4>{question.question}</h4> <Options question={question} /> </div> ); } export default Question;Understand Java thread visibility and memory anomalies
In Java, local variables defined within therun()method are private to each thread. However, when multiple threads access and modify a global or instance variable, they do so in parallel, which can lead to visibility issues and race conditions. A common anomaly is when a thread fails to see a change made to a variable by another thread (e.g., a flag used to stop a loop), causing the program to run indefinitely even after the variable has been updated.// Example of a visibility issue where 'alive' might not be seen as false by the worker thread public class CrazyThreads1 implements Runnable { boolean alive; long i; @Override public void run() { alive = true; while (true) { if (alive) { i++; } else { break; } } } public static void main(String[] args) { CrazyThreads1 c = new CrazyThreads1(); new Thread(c).start(); // ... later in main thread ... c.alive = false; // The worker thread may never see this update } }Understand Single Page Application (SPA) architecture in React
A Single Page Application (SPA) is executed entirely on the client side (browser). Unlike multi-page applications that load a complete new page upon URL change, an SPA uses JavaScript (React) to update the DOM and render the component corresponding to the new URL without a full page reload. This creates a user experience similar to a native app. While the page does not reload, the application can still fetch additional data from a web API when rendering specific components.Configure core Git settings for line endings and editors
The
[core]section manages fundamental Git behavior:autocrlf: Controls line ending conversions. Windows users should set this totrue(converts to CRLF). macOS/Linux users should set this toinput(omits conversions).editor: Specifies the text editor used for commit and tag messages.
[core] autocrlf = true editor = vim