A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
Firstly, Create React App is good. But it's a very rigid CLI, primarily designed for projects that require very little to no configuration. This makes it great for beginners and simple projects but unfortunately, this means that it's pretty non-extensible. Despite the involvement from big names and a ton of great devs, it has left me wanting a much better developer experience with a lot more polish when it comes to hot reloading, babel configuration, webpack configuration, etc. It's definitely simple and good, but not amazing.
Now, compare that experience to Next.js which for starters has a much larger team behind it provided by a world-class company (Vercel) who are all financially dedicated to making it the best DX you could imagine to build any React application. Next.js is the 💣-diggity. It has amazing docs, great support, can grow with your requirements into SSR or static site generation, etc.
| import { BroadcastChannel, createLeaderElection } from 'broadcast-channel' | |
| import React from 'react' | |
| const channels = {} | |
| export function useBroadcastLeader(id = 'default') { | |
| const [isBroadcastLeader, setIsBroadcastLeader] = React.useState(false) | |
| React.useEffect(() => { | |
| if (!channels[id]) { |
| // 粘贴到 chrome devtool console 中执行 | |
| // 使用场景 | |
| // 1. 想复制只读文档的内容 | |
| // 2. 担心复制内容的行为被公司监听了 | |
| function removeAllEvents(event) { | |
| function removeEvent(el, type) { | |
| const listeners = (getEventListeners(el)[type] || []); | |
| el[`on${type}`.toLowerCase()] = null; |
| const { safeEnv } = require('./src/env') | |
| // Note: NextConfig type allows any keys, so we are plucking the specific keys we want to type-check. | |
| /** | |
| * @type {Pick< | |
| * import('next').NextConfig, | |
| * | 'webpack' | |
| * | 'env' | |
| * >} | |
| */ |
| /* eslint-disable @typescript-eslint/no-explicit-any */ | |
| import { type TRPCQueryOptions } from '@trpc/tanstack-react-query'; | |
| import { unstable_noStore } from 'next/cache'; | |
| import { Fragment, Suspense, type ReactNode } from 'react'; | |
| import { ErrorBoundary } from 'react-error-boundary'; | |
| import { HydrateClient, prefetch as prefetchTRPC } from '@/trpc/server'; | |
| type AwaitProps<T> = | |
| | { | |
| promise: Promise<T>; |
| # Create a new worktree and branch from within current git directory. | |
| ga() { | |
| if [[ -z "$1" ]]; then | |
| echo "Usage: ga [branch name]" | |
| exit 1 | |
| fi | |
| local branch="$1" | |
| local base="$(basename "$PWD")" | |
| local path="../${base}--${branch}" |
See more of my writing here. Also check out Devin
In this post, I'll start from scratch and build up to OpenClaw's architecture step by step, showing how you could have invented it yourself from first principles, using nothing but a messaging API, an LLM, and the desire to make AI actually useful outside the chat window.
End goal: understand how persistent AI assistants work, so you can build your own (or become an OpenClaw power user).
When you use ChatGPT or Claude in a browser, there are several limitations: