React TodoList with Redurec

import { createContext, useEffect, useReducer, useState } from "react"
import { NewTodoForm } from "./NewTodoForm"
import "./styles.css"
import { TodoFilterForm } from "./TodoFilterForm"
import { TodoList } from "./TodoList"

const LOCAL_STORAGE_KEY = "TODOS"
const ACTIONS = {
  ADD: "ADD",
  UPDATE: "UPDATE",
  TOGGLE: "TOGGLE",
  DELETE: "DELETE",
}

function reducer(todos, { type, payload }) {
  switch (type) {
    case ACTIONS.ADD:
      return [
        ...todos,
        

Jina api key

JINA_API_KEY="jina_f1b9fd28bbc24908aec83525817ec537o6Uc5Nj8sS3Rxw3oUTLwKsUtJ59E"

🦑 Git - git rebase

# `git rebase` — Référence synthétique

## Principe

Rebase = **ré-appliquer des commits sur une nouvelle base**. Deux usages distincts :

1. **Rebase standard** : déplacer une branche sur la pointe d'une autre (alternative au merge)
2. **Rebase interactif** (`-i`) : réécrire, réordonner, fusionner ou supprimer des commits

---

## 1. Rebase standard — alternative au merge

### Le problème

```
main:      A --- B --- C
                 \
feature:          D --- E
```

`feature` diverge de `main`

🦑 Git - git diff

# `git diff` — Référence synthétique

## Principe

`git diff` compare deux états. Tout l'enjeu est de savoir **quels deux états** tu compares.

---

## Les 3 comparaisons fondamentales

| Commande | Compare quoi → avec quoi | Question à laquelle ça répond |
|---|---|---|
| `git diff` | Working dir → Staging | "Qu'est-ce que j'ai modifié mais **pas encore stagé** ?" |
| `git diff --staged` | Staging → Dernier commit (HEAD) | "Qu'est-ce que j'ai stagé et qui **entrera dans mon prochain commit** ?"

ブロックエディター 見出しレベルを設定

// ==============================================
// 見出しレベル設定
//==============================================
function example_modify_heading_levels_globally($args, $block_type)
{

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

	// H2,H3,H4,H5のみ
	$args['attributes']['levelOptions']['default'] = [2, 3, 4, 5];

	return $args;
}
add_filter('register_block_type_args', 'example_modify_heading_levels_globally', 10, 2);

videoタグ 属性 オプション

controls コントロールパネルを表示する<br> autoplay 動画の自動再生を有効にする<br> muted 動画に含まれる音声を消す<br> playsinline 動画のインライン再生を有効にする<br> →iOSで全画面表示をさせずに動画を再生させたい場合に設定する preload 動画ファイルを事前に読み込むかどうかを設定する<br>  none 事前に動画ファイルを読み込まない(再生ボタンを押した際に読み込みを開始する)<br>  metadata 動画のメタデータ (長さやサイズなど) のみ事前に読み込む<br>  auto(初期値) 動画ファイルを事前に読み込む<br> poster 動画が読み込まれている間に表示する画像を指定する<br>
<video controls autoplay muted playsinline preload="none" poster="thumbnail.jpg">
  <source src="" type="video/mp4">
</video>

PC Repair Website Template

<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <title>Untitled</title>
      <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css">

<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.0.2/css/bootstrap.min.css'><link rel="stylesheet" href="./style.css">

  </head>
    
  <bo

get every digit of a num

vector<int> digits;
while (n){
	digits.push_back(n % 10);
	n /= 10;
}

benchmark count execute time

void benchmark(const string &name, const auto &func) {
  auto start = chrono::high_resolution_clock::now();
  func();
  auto end = chrono::high_resolution_clock::now();
  auto duration = chrono::duration_cast<chrono::milliseconds>(end - start);
  cout << format("{} execution time: {} ms\n", name, duration.count());
}

toBase

string toBase(int x, int base){
	string res;
	while (x){
		int mod = x % base;
		res += (mod < 10 ? mod + '0' : mod - 10 + 'A');
		x /= base;
	}
	reverse(res.begin(), res.end());
	return res;
}

jiangly

#include <bits/stdc++.h>

using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;

using u128 = unsigned __int128;
using i128 = __int128;

int main(){
	std::ios::sync_with_stdio(false);
	std::cin.tie(nullptr);
	
	return 0;
}

How to Master the Gravity-Defying Tunnels: A Guide to Experiencing Run 3

Hey everyone! If you are looking for a fun way to pass the time during a quick study break or a lazy weekend afternoon, browser-based games are usually the perfect go-to. Among the endless sea of platformers out there, one title always brings back a wave of fond nostalgia and pure, unadulterated fun: Run 3. It is a deceptively simple, space-themed game that tests your reflexes and somehow always keeps you hitting that "restart" button for just one more try. Today, I want to share a quick overvie

2 col grid

First col auto width with truncation, second col fixed
.container {
  display: grid;
  grid-template-columns: minmax(0, max-content) 200px;
  gap: 16px;
}

.first-col {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

NOS

**Some quick templates/snippets when coding and solving Problems**
#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;

#ifndef DEBUG
struct __X {
  __X& operator<<(const auto& str) { return *this; }
  void sp(const string& str = "") {}
} dout;
#define debug(x)
#endif

int main(){
	cin.tie(0)->sync_with_stdio(0);

	return 0;
}

hello

#include <iostream>
using namespace std;

int main(){
  cout << "hello world" << endl;
  return 0;
}