(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // Update globs depending on your framework | |
| --- | |
| name: tailwind_v4 | |
| description: Guide for using Tailwind CSS v4 instead of v3.x | |
| globs: ["**/*.{js,ts,jsx,tsx,mdx,css}"] | |
| tags: | |
| - tailwind | |
| - css | |
| --- |
| import anthropic | |
| import os | |
| import sys | |
| from termcolor import colored | |
| from dotenv import load_dotenv | |
| class ClaudeAgent: | |
| def __init__(self, api_key=None, model="claude-3-7-sonnet-20250219", max_tokens=4000): | |
| """Initialize the Claude agent with API key and model.""" |
| /** | |
| * List unique CSS properties for all DOM elements | |
| * Initially created to list unique font stacks on a page | |
| * @see {@link http://stackoverflow.com/a/35022690/ Inspired by this StackOverflow answer} | |
| * | |
| * @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a/ URL for this file} | |
| * | |
| * @author AndrewRMinion Design (https://andrewrminion.com) | |
| * @version 1.1 | |
| * |
| import { useState, useEffect } from "react"; | |
| export const useFetch = (url, ref, initialValue) => { | |
| const [data, setData] = useState(initialValue); | |
| const [error, setError] = useState(null); | |
| const [loading, setLoading] = useState(true); | |
| useEffect(() => { | |
| if (ref.current) { | |
| (async () => { |
| public class AsyncMediatorPipeline<TRequest, TResponse> : IAsyncRequestHandler<TRequest, TResponse> where TRequest : IAsyncRequest<TResponse> | |
| { | |
| private readonly IAsyncRequestHandler<TRequest, TResponse> inner; | |
| private readonly IAsyncPreRequestHandler<TRequest>[] preRequestHandlers; | |
| private readonly IAsyncPostRequestHandler<TRequest, TResponse>[] postRequestHandlers; | |
| public AsyncMediatorPipeline(IAsyncRequestHandler<TRequest, TResponse> inner, IAsyncPreRequestHandler<TRequest>[] preRequestHandlers, IAsyncPostRequestHandler<TRequest, TResponse>[] postRequestHandlers) | |
| { | |
| this.inner = inner; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.