3643. Flip Square Submatrix Vertically

You are given an m x n integer matrix grid, and three integers x, y, and k. The integers x and y represent the row and column indices of the top-left corner of a square submatrix and the integer k represents the size (side length) of the square submatrix. Your task is to flip the submatrix by reversing the order of its rows vertically. Return the updated matrix.
/**
 * @param {number[][]} grid
 * @param {number} x
 * @param {number} y
 * @param {number} k
 * @return {number[][]}
 */
var reverseSubmatrix = function(grid, x, y, k) {
    // We are flipping a kxk square whose top-left corner is (x, y)
    // A vertical flip means reversing the order of its rows.

    // 'top' starts at the first row of the square
    let top = x;

    // 'bottom' starts at the last row of the square
    let bottom = x + k - 1;

    // Continue swapping rows until the pointe

3643. Flip Square Submatrix Vertically

You are given an m x n integer matrix grid, and three integers x, y, and k. The integers x and y represent the row and column indices of the top-left corner of a square submatrix and the integer k represents the size (side length) of the square submatrix. Your task is to flip the submatrix by reversing the order of its rows vertically. Return the updated matrix.
/**
 * @param {number[][]} grid
 * @param {number} x
 * @param {number} y
 * @param {number} k
 * @return {number[][]}
 */
var reverseSubmatrix = function(grid, x, y, k) {
    // We are flipping a kxk square whose top-left corner is (x, y)
    // A vertical flip means reversing the order of its rows.

    // 'top' starts at the first row of the square
    let top = x;

    // 'bottom' starts at the last row of the square
    let bottom = x + k - 1;

    // Continue swapping rows until the pointe

Neo4j — Command Reference

# Neo4j AuraDB — Command Reference

## Connection Details

| Property       | Value                                  |
|----------------|----------------------------------------|
| **Database**   | dev                                    |
| **Username**   | neo4j                                  |
| **Password**   | jepVtKm1rOwlmNeDEQMqo4eani96Ig21vFab8oMw8Jo |
| **URI**        | `neo4j+s://0435400a.databases.neo4j.io` |

### Connecting to the Server

```cypher
:server connect
```

---

## 1. Ba

Puppet Module - Reboot

# Puppet Module: `reboot`

## Overview

Triggers a system reboot on nodes that have been running for more than 30 days. The reboot command is OS-aware and resolves to the appropriate shutdown utility for the managed node's kernel.

---

## Source

```puppet
class reboot {
  if $facts[kernel] == "windows" {
    $cmd = "shutdown /r"
  } elsif $facts[kernel] == "Darwin" {
    $cmd = "shutdown -r now"
  } else {
    $cmd = "reboot"
  }
  if $facts[uptime_days] > 30 {
    exec { 'reboot':
      comma

Puppet Module - Packages

# Puppet Module: `packages`

## Overview

Manages package installation across nodes. Ensures `python-requests` is present on all managed nodes, with additional OS-family-specific packages installed depending on the distribution.

---

## Source

```puppet
class packages {
  package { 'python-requests':
      ensure => installed,
  }
  if $facts[os][family] == "Debian" {
    package { 'golang':
      ensure => installed,
    }
  }
  if $facts[os][family] == "RedHat" {
    package { 'nodejs':
    

Puppet Module - Machine Info

# Puppet Module: `machine_info`

## Overview

Collects and writes system information to a local file on the managed node. The output path is OS-aware — it resolves to the appropriate temp directory depending on the host's kernel.

---

## Source

```puppet
class machine_info {
  if $facts[kernel] == "windows" {
      $info_path = "C:\Windows\Temp\Machine_Info.txt"
  } else {
      $info_path = "/tmp/machine_info.txt"
  }
  file { 'machine_info':
      path    => $info_path,
      content => temp

Linux Command Reference

# Linux Command Reference

A categorized reference guide for common Linux/Unix shell commands.

---

## 1. Basic Output & System Info

| Command | Description |
|--------|-------------|
| `echo Hello World` | Prints `Hello World` to the terminal |
| `date` | Displays the current date and time |
| `whoami` | Prints the current logged-in username |

---

## 2. Navigation

| Command | Description |
|--------|-------------|
| `pwd` | Print Working Directory — shows the full path of the current direc

NVM Command Reference

# NVM Command Reference

A reference guide for [NVM (Node Version Manager)](https://github.com/nvm-sh/nvm) — a tool for managing multiple Node.js versions on the same machine.

---

## Installation

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
```

Downloads and runs the NVM install script via `curl`. After installation, restart your terminal or source your shell config (e.g. `source ~/.bashrc`).

---

## Verify Installation

| Command | Description |
|-

Elasticsearch Commands Reference

# Elasticsearch Commands Reference

> Reference: [Complete Guide to Elasticsearch](https://github.com/codingexplained/complete-guide-to-elasticsearch)

---

## Table of Contents

1. [Cluster & Node Monitoring](#1-cluster--node-monitoring)
2. [Index Management](#2-index-management)
3. [Document CRUD](#3-document-crud)
4. [Scripted Updates](#4-scripted-updates)
5. [Upserts](#5-upserts)
6. [Bulk Operations](#6-bulk-operations)
7. [Multi-Get](#7-multi-get)
8. [Search Queries](#8-search-queries)
9. [

Batcher Generator — Both Implementations

# Batcher Generator — Both Implementations

A private TypeScript generator method that splits an array of string tuples into chunks of a given size. Two implementations exist, each with different trade-offs.

---

## Implementation A — Index-based (`slice`)

```ts
private* batcher(aggs: [string, string][] = [], batchSize: number = 5) {
  let j = 0;
  for (let i = 0; i < aggs.length; i += batchSize) {
    j = i + batchSize;
    yield aggs.slice(i, j);
  }
}
```

### How It Works

1. Iterates over

Performance Measurement — Node.js

# ⏱️ Performance Measurement — Node.js

Utilities for measuring execution time of async service calls using the `perf_hooks` API.

---

## Snippet 1 — Single Call Measurement

Wraps a single async operation to measure its execution time in milliseconds.

```typescript
import { performance } from 'perf_hooks';

const start = performance.now();

// Replace with your async service call
const result = await myService.doSomething(params);

const end = performance.now();
const elapsed = end - start;

Commit Workflow

# Commit Workflow — Toolchain & Execution Flow

> Enforced formatting · Standardized commit messages · Mandatory JIRA traceability

---

## Toolchain Overview

| Tool | Role |
|---|---|
| **Commitizen** (`cz`) | Interactive prompt to build a conventional commit message |
| **@commitlint/cz-commitlint** | Adapter that powers the Commitizen prompt with commitlint rules |
| **Husky** | Manages and runs Git hooks at the right lifecycle points |
| **lint-staged** | Runs Prettier on staged `.ts` files

VS Code Workspace Setup - Windows

# VS Code Workspace Setup

## Prerequisites

Open a Linux terminal and run the following:

```bash
cd projects
nano core-api.code-workspace
```

Paste the following configuration:

```json
{
    "folders": [
        {
            "path": "./core-api"
        }
    ],
    "settings": {
        "terminal.integrated.cwd": "${workspaceFolder}",
        "terminal.integrated.defaultProfile.linux": "bash"
    },
    "remoteAuthority": "wsl+Ubuntu"
}
```

Save and exit: `Ctrl + X` → `Y` → `Enter`

---

(grid)カードレイアウトでボタンを揃える

(参考サイト) https://qiita.com/yosei_ikegami/items/530ab46a3e6d3650b0d7
<div class="card-grid">
  <div class="card">
    <div class="card-header">カードタイトル1</div>
    <div class="card-body">カードの内容がここに入ります。長いテキストでも高さが揃います。長いテキストでも高さが揃います。長いテキストでも高さが揃います。長いテキストでも高さが揃います。</div>
    <div class="card-footer">フッター</div>
  </div>
  
  <div class="card">
    <div class="card-header">カードタイトル2</div>
    <div class="card-body">短い内容</div>
    <div class="card-footer">フッター</div>
  </div>
  
  <div class="card">
    <div class="card-header">カードタイトル3</div>
    <div class="card-body"

【プラグイン】 Peek:ページの途中で上方向にスクロールするとヘッダを上部から表示

(参考サイト) https://coliss.com/articles/build-websites/operation/javascript/headroom-style-scroll-intent-library.html
(Peek)
https://adesignl.github.io/Peek/

フッターを画面最下部に固定(コンテンツ量が少ない状態)

body {
  min-height: 100dvh;
}

footer {
  position: sticky;
  top: 100%;
}