Git: Reset/Sync main with dev on branch-drift

#Create Backup of Main (optional)
git fetch --all --tags
git checkout main
git pull

git branch main-backup-$(date +%Y%m%d)
git push origin main-backup-$(date +%Y%m%d)

# Reset Main to dev:
git checkout main
git reset --hard origin/dev
git push --force-with-lease origin main

glm

我在使用GLM Coding Plan,数小时内完成过去需要数周的开发工作,赠送你1张7天AI Coding体验卡,一起来用吧:https://open.bigmodel.cn/activity/trial-card/6WHV88OFUX

2ced31df52d1411a8ac0a6799620b21b.PyJm3WTaZdlnDV39

53dc0c152c434111808493d898fc9691.pCnWPI9A5FsjbqHO

How to execute javasript code inside the browser that is running the code in Playwright?

// To execute JavaScript code inside a browser using Playwright, use the page.evaluate() method. This API runs a JavaScript function within the web page's context, allowing you to access browser globals like window and document

const href = await page.evaluate(() => document.location.href);

const status = await page.evaluate(async () => {
  const response = await fetch(location.href);
  return response.status;
});

how to run a test and see the browser executing it?

# using the --headed option --headed
npx playwright test --headed

Interactive Elfsight Script

Elfsight now puts the embed into a `#shadow-root (open)` - using some js, we can still make it so that CSS and JS apply to these embeded elements. This snippet requires that the display of the embed in Elfsight be set to LIST. With this snippet, i was able to animate the embed elements when the section came into view. exapmle: https://hopepres2026.speakcreative.com/ (socials near the footer)
   const interval = setInterval(() => {
      const widget = document.querySelector('.es-embed-root');
      if (!widget?.shadowRoot) return;

      const shadowRoot = widget.shadowRoot;
      const posts = shadowRoot.querySelectorAll('.es-list-layout > div');
      if (!posts.length) return;

      clearInterval(interval);
      injectStylesheet(shadowRoot);
      
   }, 300);

   function injectStylesheet(shadowRoot) {
      if (shadowRoot.querySelector('#social-animation-css')) return;

     

3660. Jump Game IX

You are given an integer array nums. From any index i, you can jump to another index j under the following rules: Jump to index j where j > i is allowed only if nums[j] < nums[i]. Jump to index j where j < i is allowed only if nums[j] > nums[i]. For each index i, find the maximum value in nums that can be reached by following any sequence of valid jumps starting at i. Return an array ans where ans[i] is the maximum value reachable starting from index i.
/**
 * @param {number[]} nums
 * @return {number[]}
 */
var maxValue = function(nums) {
    const n = nums.length;
    const pref = Array(n);
    const suff = Array(n);

    // prefix max
    pref[0] = nums[0];
    for (let i = 1; i < n; i++) {
        pref[i] = Math.max(pref[i-1], nums[i]);
    }

    // suffix min
    suff[n-1] = nums[n-1];
    for (let i = n-2; i >= 0; i--) {
        suff[i] = Math.min(suff[i+1], nums[i]);
    }

    const ans = Array(n);
    let start = 0;

    for (let i = 

Style overrides - TwentyTwentySix

/* Remove extra space above footer */

Hover Autoplays Video (YouTube API)

Using YouTube Player API (https://developers.google.com/youtube/iframe_api_reference), have a video start/stop programmatically on event. example: https://hopepres2026.speakcreative.com/ (media section)
{% assign medias = Module.FieldValues.MediaArchiveSource.Episodes %}
{% assign mediaSorted = medias | OrderBy: 'DisplayDateTime', 'desc' %}

<div class="pp-home-media">
   <div class="bg-wrapper">
      <span class="logomark1"></span>
      <span class="logomark2"></span>
   </div>
   <div class="section-copy">{{Module.FieldValues.SectionCopy}}</div>
   <div class="recent-medias">
      {% for media in mediaSorted limit:1 %}
      <div class="first-event">
         <a href="/{{Module

Scoping process

- Issue Summary
- Key Findings
- Root Cause Analysis
- Recommended Solution

公開直後のwebサイトですらbotによる大量アクセスがくる仕組みと対策

# HTTPSサイト公開直後のbotによる大量アクセスの原因と対策

## 1. 状況と発生事象

### 1.1 発生する状況

| 状況 | 発生事象 |
|---|---|
| HTTPS通信用のTLS証明書(慣例的に「SSL証明書」と呼称)を発行する | 証明書情報がCertificate Transparency Log(CT Log)に登録される |
| CT Logに登録される | 第三者が誰でも検索・取得可能な状態になる |
| CT Logを監視する攻撃botがドメインを発見する | 当該ドメインに対してHTTPアクセスを開始する |

### 1.2 攻撃の対象範囲

以下のすべてが対象となる。

- 本番サイト
- ステージング環境
- 内部向けにのみ共有されたページ
- SNS等で外部公開していないサイト

### 1.3 攻撃の発生タイミング

- ドメイン設定および証明書発行の直後
- 公開後も定期的に発生する

### 1.4 攻撃botの具体的動作

特定パスへの決め打ちアクセスを行う。例として以下のパスがある。

- `/.env`
- `/.giti

61. Rotate List

Given the head of a linked list, rotate the list to the right by k places.
/**
 * Definition for singly-linked list.
 * function ListNode(val, next) {
 *     this.val = (val===undefined ? 0 : val)
 *     this.next = (next===undefined ? null : next)
 * }
 */
/**
 * @param {ListNode} head
 * @param {number} k
 * @return {ListNode}
 */
var rotateRight = function(head, k) {
    if (!head || !head.next || k === 0) return head;

    // 1. Find length and tail
    let n = 1;
    let tail = head;
    while (tail.next) {
        tail = tail.next;
        n++;
    }

    // 2. M

UI Resources

- https://jakub.kr/writing/details-that-make-interfaces-feel-better

lm studio mcp

{
  "mcpServers": {
    "firecrawl-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "firecrawl-mcp"
      ],
      "env": {
        "FIRECRAWL_API_KEY": "fc-0b4d8657290a4ffdacee91bb1614089d"
      }
    },
    "exa": {
      "command": "npx",
      "args": [
        "-y",
        "exa-mcp-server"
      ],
      "env": {
        "EXA_API_KEY": "e030e9c4-3bbb-47d1-ae23-7f12dce7ed2a"
      }
    },
    "mem0-mcp": {
      "url": "https://mcp.mem0.ai/mcp"
    },
    "playwright"

bottoken

8627698076:AAHWaPdj1mPCTd-Foq4NwWmE0K28otWIuow 

48. Rotate Image

You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.
/**
 * @param {number[][]} matrix
 * @return {void} Do not return anything, modify matrix in-place instead.
 */
var rotate = function(matrix) {
    const n = matrix.length;

    // 1. Transpone
    for (let i = 0; i < n; i++) {
        for (let j = i + 1; j < n; j++) {
            [matrix[i][j], matrix[j][i]] = [matrix[j][i], matrix[i][j]];
        }
    }

    // 2. Reverse each row
    for (let i = 0; i < n; i++) {
        matrix[i].reverse();
    }
};