3517. Smallest Palindromic Rearrangement I

You are given a palindromic string s. Return the lexicographically smallest palindromic permutation of s.
/**
 * @param {string} s
 * @return {string}
 */
var smallestPalindrome = function(s) {
    // Count characters
    const count = Array(26).fill(0);
    for (const ch of s) {
        count[ch.charCodeAt(0) - 97]++;
    }

    let left = "";
    let mid = "";

    // Build left half + detect middle
    for (let i = 0; i < 26; i++) {
        const c = String.fromCharCode(97 + i);
        if (count[i] % 2 === 1) mid = c;    // odd count → middle
        left += c.repeat(Math.floor(count[i] / 2));
 

IELTS-up Listening Sample 5

32
electricity
internet
bus station
Hooper
passport
employment contract
reference from a fried or colleague
6:30 PM
At the caller's future apartment
24
18
5
19
Familiy ticket
107
online
confirmation email
by telephone
in person
7 weeks
5 people
grab people's attention
Marketing
Design of custom logos
Branding
E-commerce
Customer attraction
Ground floor
assignment
A
A?
C
A
C
rent earth?
susseptable
frequent sand storms
eye sight
architectural deeds

1464. Maximum Product of Two Elements in an Array

Given the array of integers nums, you will choose two different indices i and j of that array. Return the maximum value of (nums[i]-1)*(nums[j]-1).
/**
 * @param {number[]} nums
 * @return {number}
 */
var maxProduct = function(nums) {
    // We want the two largest numbers in the array.
    // Initialize max1 as the largest, max2 as the second largest.
    let max1 = 0;
    let max2 = 0;

    // Loop through each number in the array
    for (let n of nums) {
        // If n is greater than or equal to the current largest
        if (n >= max1) {
            // Shift max1 down to max2
            max2 = max1;
            // Update max1 to t

Rebase `--onto`

Say the 1st commit on the branch was `8f8949a` and the commit before that as `8b1ed4d` (the "tip"), then run `git rebase -onto develop 8b1ed4d`, assuming the base branch is `develop`.
git rebase --onto <base-branch> <last-commit-to-start-from>

Launch Affinity Designer 2 - AutoHotKey

#Requires AutoHotkey v2.0

SetTitleMatchMode(2)

Run('"' EnvGet("LOCALAPPDATA") '\Microsoft\WindowsApps\AffinityDesigner2.exe"')

if WinWait("Affinity Designer",, 15)
{
    WinRestore("Affinity Designer")
    WinActivate("Affinity Designer")
}

Launch Edge with URL as argument - AutoHotKey

#Requires AutoHotkey v2.0

; First command-line argument = URL
if A_Args.Length < 1
{
    MsgBox "Usage:`nOpenUrl.ahk <URL>"
    ExitApp
}

url := A_Args[1]

; Open the URL in the default browser
Run(url)

; Open ChatGPT in the default browser
; ** Not in use **
;Run("url)

; Wait for Microsoft Edge (remove this block if you use another browser)
if WinWait("ahk_exe msedge.exe",,10)
{
    WinActivate("ahk_exe msedge.exe")
}

Launch ChatGPT in Edge

#Requires AutoHotkey v2.0

; Open ChatGPT in the Edge
Run('"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --new-tab https://chatgpt.com')

; Open ChatGPT in the default browser
; ** Not in use **
;Run("https://chatgpt.com")

; Wait for browser window to exist
if WinWait("ahk_exe msedge.exe",,10)
{
    WinActivate("ahk_exe msedge.exe")
}

Launch Dropbox in explorer - AutoHotKey

#Requires AutoHotkey v2.0

Run('explorer.exe "' EnvGet("USERPROFILE") '\Dropbox"')
WinWait("ahk_class CabinetWClass",,2)
WinActivate("ahk_class CabinetWClass")

Launch Dropbox in explorer - AutoHotKey

#Requires AutoHotkey v2.0

Run('explorer.exe "' EnvGet("USERPROFILE") '\Dropbox"')
WinWait("ahk_class CabinetWClass",,2)
WinActivate("ahk_class CabinetWClass")

Launch File Explorer - AutoHotKey

#Requires AutoHotkey v2.0

Run("explorer.exe")
WinWait("ahk_class CabinetWClass",,2)
WinActivate("ahk_class CabinetWClass")

center mouse cursor - AutoHotKey

#Requires AutoHotkey v2.0

CoordMode "Mouse", "Screen"

primary := MonitorGetPrimary()

MonitorGetWorkArea(
    primary,
    &left,
    &top,
    &right,
    &bottom
)

centerX := left + (right - left) // 2
centerY := top + (bottom - top) // 2

MouseMove centerX, centerY, 0

ExitApp

FZF - Mac port

# fzf → macOS (Homebrew + zsh) port kit

Companion to `patch-work-mac-port.md`. Contains: (1) what the Linux fzf notes say,
(2) the macOS/zsh translation and gotchas, (3) a ready-to-paste prompt for Claude Code
on the Mac vault.

---

## 1. What exists on Linux

Two linked notes in `linux-setup/wiki/`, indexed from `linux-setup/context.md`:

- **`fzf-setup.md`** — install, shell integration, `Ctrl+R` tuning, usage.
- **`env-bash-history-cleanup.md`** — the one-time `~/.bash_history` cleanup that

Beyond the Board: Running Your Own Wordle Unlimited "Store"

We’ve all been there – that satisfying click as the last letter turns green, the triumphant feeling of cracking the daily [wordle unlimited](https://wordleunlimitedfree.com/). But what if we looked at this beloved word puzzle not just as a game, but as a miniature business operation? Imagine you’re not just a player, but a savvy store manager, meticulously handling your inventory, fulfilling customer orders, and striving for maximum efficiency. And our bustling establishment today? It’s wordle u

Patch Work - Mac port

# patch-work → macOS (Homebrew) port kit

Everything needed to recreate the Linux `patch-work` command on the Mac tech-vault.
Contains: (1) what the Linux script does, (2) the macOS gotchas, (3) a ready-to-paste
prompt for Claude Code on the Mac.

---

## 1. What the Linux script is

- **File:** `shell-scripts/raw/apt-maintain.sh` in the Linux tech-vault (source of truth;
  `~/.local/bin/apt-maintain.sh` is a **symlink** back to it).
- **Invoked as:** `patch-work` — a `~/.bashrc` alias pointing 

628. Maximum Product of Three Numbers

Given an integer array nums, find three numbers whose product is maximum and return the maximum product.
/**
 * @param {number[]} nums
 * @return {number}
 */
var maximumProduct = function(nums) {
    // Track the three largest values
    let max1 = -Infinity, max2 = -Infinity, max3 = -Infinity;

    // Track the two smallest values (could be negative)
    let min1 = Infinity, min2 = Infinity

    for (let n of nums) {

        // Update the three largest numbers
        if (n > max1) {
            max3 = max2;    // shift down
            max2 = max1;
            max1 = n;
        } else if (n > m

見出しレベルを設定する

add_filter( 'register_block_type_args', function( $args, $block_type ) {
	if ( 'core/heading' !== $block_type ) {
		return $args;
	}

  //H2からH5まで
	$args['attributes']['levelOptions']['default'] = [ 2, 3, 4, 5 ];

	return $args;
}, 10, 2 );