Searching the best prompts from our community
Discover the best AI prompts from our community
Generate documentation for the following TypeScript function in JSDoc format. The function accepts a user object and returns a formatted greeting string. Make sure to document the parameters, their types, and the return value.
Master PPC advertising with Google Ads, Facebook Ads, and advanced bidding strategies for maximum ROI. Google Ads optimization: 1. Campaign structure: ad groups with 5-20 related keywords, single keyword ad groups (SKAGs) for high-volume terms. 2. Keyword strategy: exact match for conversions, broad...
Build recommendation systems using collaborative filtering, content-based filtering, and hybrid approaches for personalization. Collaborative filtering approaches: 1. User-based CF: find similar users, recommend items liked by similar users, cosine similarity calculation. 2. Item-based CF: find simi...
Implement comprehensive model evaluation and validation frameworks with proper metrics and statistical analysis. Classification metrics: 1. Accuracy: correct predictions / total predictions, baseline comparison, stratified sampling. 2. Precision: true positives / (true positives + false positives), ...
Build comprehensive NLP pipelines for text analysis, sentiment analysis, and language understanding tasks. Text preprocessing pipeline: 1. Data cleaning: remove HTML tags, normalize Unicode, handle encoding issues. 2. Tokenization: word-level, subword (BPE, SentencePiece), sentence segmentation. 3. ...
Master systematic model selection and optimization for machine learning projects with performance evaluation frameworks. Model selection process: 1. Problem definition: classification vs. regression, supervised vs. unsupervised learning. 2. Data assessment: sample size (minimum 1000 for deep learnin...
Create a multi-page application with Parcel's zero-config approach. Setup: 1. Multiple HTML entry points. 2. Automatic code splitting per page. 3. Shared chunks for common dependencies. 4. Hot module replacement. 5. Image optimization and resizing. 6. PostCSS and Sass support out-of-box. 7. Environm...
Choose Git workflow for team. Strategies: 1. Git Flow (main, develop, feature, release, hotfix). 2. GitHub Flow (main, feature branches, PR). 3. Trunk-based (short-lived branches, frequent merges). 4. Branch naming conventions. 5. Commit message standards. 6. Pull request templates. 7. Protected bra...
Build comprehensive E2E testing with Playwright. Test structure: 1. Page Object Model for maintainability. 2. Multi-browser testing (Chromium, Firefox, WebKit). 3. Parallel test execution. 4. Visual regression with screenshots. 5. Network mocking and interception. 6. Authentication state persistence...
Document components effectively with Storybook 7. Setup: 1. CSF3 format for stories. 2. Autodocs for prop table generation. 3. Controls addon for prop manipulation. 4. Actions addon for event logging. 5. Interactions testing with @storybook/test. 6. Accessibility checks with a11y addon. 7. Design to...
Authentic Italian tomato sauce (Sugo al Pomodoro). Ingredients: 28oz can San Marzano DOP tomatoes, 5 cloves garlic, 1/4 cup extra virgin olive oil, fresh basil. Method: 1. Crush tomatoes by hand. 2. Sauté whole garlic in olive oil until golden. 3. Remove garlic, add tomatoes carefully (splatters). 4...
Handle crises with communication plan. Framework: 1. Identify potential crises. 2. Crisis response team. 3. Communication protocols (who says what, when). 4. Internal communication first. 5. External stakeholder messaging. 6. Media strategy if needed. 7. Social media monitoring and response. 8. Post...
Write effective unit tests with Vitest. Practices: 1. describe/it blocks for test organization. 2. expect assertions with matchers. 3. Mock functions with vi.fn() and vi.spyOn(). 4. Component testing with @testing-library/react. 5. Coverage reporting with c8. 6. Snapshot testing for UI components. 7...
Implement component testing with Cypress. Workflow: 1. Mount React/Vue components in isolation. 2. cy.get() for element selection. 3. Intercept API calls with cy.intercept(). 4. Test user interactions (click, type, drag). 5. Visual viewport testing. 6. Custom commands for reusability. 7. Fixtures fo...
Calculate and optimize CAC. Formula: Total Sales & Marketing Costs ÷ Number of New Customers. Best practices: 1. Segment by channel. 2. Include all costs (tools, salaries, ads). 3. Track cohorts over time. 4. Compare to LTV (LTV:CAC ratio should be 3:1). 5. Payback period (ideally < 12 months). 6. O...
Build a cross-platform desktop app with Electron and React. Architecture: 1. Main process for system APIs. 2. Renderer process with React UI. 3. IPC communication between processes. 4. Context isolation for security. 5. Auto-updater for releases. 6. Native menus and tray icons. 7. File system access...
Create a lightweight desktop app with Tauri. Benefits: 1. Rust backend for performance and security. 2. Native webview (no bundled Chromium). 3. React/Vue/Svelte frontend. 4. Commands for Rust-to-JS communication. 5. File system API with permissions. 6. System tray and notifications. 7. Smaller bund...
Professional catering event planning. Timeline 100-person wedding buffet: Day before: shop, prep vegetables, make sauces, bake desserts. Event day: -4 hours: arrive, set up kitchen. -3 hours: start cooking proteins. -2 hours: finish sides, keep warm. -1 hour: set buffet, chafing dishes. Service: rep...
Restaurant plating techniques for visual impact. Rule of odds: plate 3, 5, or 7 elements. Height: build vertical elements for dimension. Color: 3-4 contrasting colors maximum. Negative space: don't overcrowd, leave 40% of plate empty. Sauce: dots, swooshes, or under the protein. Garnish: must be edi...
Classic French vinaigrette technique. Ratio: 3:1 oil to acid (eternal rule). Base: 1 tbsp Dijon mustard (emulsifier). Acid: red wine vinegar or lemon juice. Oil: extra virgin olive oil. Method: 1. Whisk mustard with acid and salt. 2. Slowly drizzle oil while whisking constantly. 3. Emulsion forms (t...
Build native mobile apps with Capacitor. Features: 1. Shared web codebase for iOS/Android. 2. Native plugin APIs (Camera, Geolocation, Storage). 3. Custom native plugins. 4. Live reload during development. 5. Native UI components when needed. 6. App Store deployment workflow. 7. Push notifications w...
Implement navigation in React Native apps. Patterns: 1. Stack navigator for hierarchical screens. 2. Tab navigator for main sections. 3. Drawer navigator for side menu. 4. Deep linking and universal links. 5. Screen transitions and gestures. 6. Nested navigators composition. 7. Authentication flow r...
Scan for security vulnerabilities. Tools: 1. SAST (Snyk, SonarQube) for code analysis. 2. DAST for runtime scanning. 3. Dependency scanning (npm audit, Dependabot). 4. Secret detection (GitGuardian). 5. Container scanning. 6. Infrastructure as Code scanning. Integrate in CI/CD. Fix critical issues i...
Develop with Expo's managed workflow. Features: 1. Over-the-air updates with EAS Update. 2. No native code compilation needed. 3. Expo SDK for native functionality. 4. Development builds for custom native code. 5. Easy third-party library integration. 6. QR code app distribution. 7. Push notificatio...
Design Flutter apps with platform-adaptive UI. Architecture: 1. StatelessWidget and StatefulWidget patterns. 2. Provider or Riverpod for state management. 3. Platform checks for iOS/Android differences. 4. Cupertino widgets for iOS feel. 5. Material Design 3 for Android. 6. Responsive layouts with L...
Run efficient, outcome-driven sales meetings. Pre-meeting (24 hours before): send agenda email. 'Looking forward to our call. My understanding is we'll cover: 1. [Agenda item]. 2. [item]. 3. [item]. I'll share [specific outcome]. Please let me know if you'd like to add anything.' Meeting structure: ...
Optimize retail merchandising. Strategies: 1. Product placement (eye level, end caps). 2. Planogram optimization. 3. Seasonal displays and themes. 4. Cross-merchandising complementary products. 5. Signage and pricing clarity. 6. Inventory visibility. 7. Store traffic flow design. 8. Impulse buy posi...
Build modern iOS apps with SwiftUI. Components: 1. View protocol for custom views. 2. @State and @Binding for local state. 3. @ObservedObject for external state. 4. List with ForEach for collections. 5. Navigation with NavigationStack. 6. Async/await for data loading. 7. Custom view modifiers. 8. An...
Create Android UI with Jetpack Compose. Structure: 1. Composable functions for UI components. 2. remember and mutableStateOf for state. 3. LazyColumn for efficient lists. 4. Modifier chain for styling. 5. ViewModel integration. 6. Material 3 theming. 7. Side effects with LaunchedEffect. 8. Navigatio...
Conduct M&A due diligence. Checklist: 1. Financial (3+ years statements, audit). 2. Legal (contracts, litigation, IP). 3. Commercial (customers, retention, pipeline). 4. Technical (code quality, tech debt, security). 5. Team (org chart, key person risk). 6. Operations (scalability, dependencies). 7....
Implement GraphQL with Apollo Client. Setup: 1. ApolloProvider with InMemoryCache. 2. useQuery hook for data fetching. 3. useMutation for data updates. 4. Optimistic UI responses. 5. Cache policies (cache-first, network-only). 6. Fragment composition for reusable fields. 7. Pagination with fetchMore...
Build type-safe APIs with tRPC. Architecture: 1. Define routers with input/output schemas. 2. Zod for runtime validation. 3. Automatic TypeScript inference. 4. React Query integration for client. 5. Middleware for auth and logging. 6. Context for user sessions. 7. Subscriptions with WebSockets. 8. E...
Apply reciprocity to build sales relationships. Principle: people feel obligated to give back when they receive something of value. Sales applications: 1. Give before asking: share valuable insight, industry report, template, introduction before pitching. 2. Free trial or pilot: let them experience ...
Deliver strategic QBRs to enterprise customers. Preparation (1 week before): 1. Pull usage analytics. 2. Calculate ROI realized. 3. Gather customer feedback/support tickets. 4. Prepare personalized slide deck. Attendees: customer champion, economic buyer, your CSM and AE. QBR agenda (60 mins): 1. We...
Build accessible sales enablement repository. Content types: 1. Pitch decks (elevator, 10-min, 30-min versions). 2. One-pagers (product overview, vs competitors, feature sheets). 3. Case studies (by industry, company size, use case). 4. Demo scripts and recordings. 5. Email templates (prospecting, f...
Navigate complex enterprise procurement. Procurement stages: 1. Vendor approval (get on approved vendor list). 2. Security review (fill SOC 2, ISO certs, questionnaire). 3. Legal review (redline MSA, negotiate terms). 4. Purchase order (PO issued by procurement). What procurement needs: W9, insuranc...
Master data fetching with Tanstack Query (React Query). Features: 1. useQuery for async state management. 2. Query keys for caching strategy. 3. Automatic refetching on window focus. 4. Mutations with invalidation. 5. Optimistic updates for instant UI. 6. Infinite queries for pagination. 7. Prefetch...
Implement SWR for optimal data experience. Pattern: 1. useSWR hook with cache key. 2. Return stale data immediately. 3. Revalidate in background. 4. Dedupe simultaneous requests. 5. Focus revalidation. 6. Interval polling for real-time feel. 7. Error retry with exponential backoff. 8. Mutation with ...
Practice test-driven development. Workflow: 1. Write failing test first (Red). 2. Write minimal code to pass (Green). 3. Refactor while keeping tests green. 4. Repeat cycle. Benefits: Better design, confidence, documentation. Write tests for: edge cases, error handling, happy path. Use describe/it s...
Manage state simply with Zustand. Implementation: 1. create() store with actions. 2. Minimal boilerplate vs Redux. 3. No providers needed. 4. Middleware for persistence. 5. Devtools integration. 6. Slices pattern for large stores. 7. Immer for mutations. 8. TypeScript support. Use selectors to preve...
Use Jotai's atomic approach to state. Concepts: 1. atom() for primitive state. 2. Derived atoms with get(). 3. Async atoms for data fetching. 4. atomFamily for dynamic atoms. 5. useAtom hook like useState. 6. Focus on specific atoms. 7. No string keys needed. 8. Works with Suspense. Minimal re-rende...
Perfect smash burger technique. Patties: 2.5oz 80/20 ground chuck, room temp, loose balls. Griddle: cast iron or flat-top at 400°F+. Method: 1. Place ball on griddle, smash hard with spatula for 3 seconds (thin = crispy edges). 2. Season with salt/pepper. 3. Cook 2 minutes undisturbed for crust. 4. ...
Professional bread scoring using lame (razor blade). Patterns: 1. Single Slash (bâtard): 45-degree angle, 1/2 inch deep, swift motion. 2. Cross Score (boule): two perpendicular cuts. 3. Leaf Pattern: multiple curved cuts. 4. Wheat Stalk: S-curve with diagonal cuts. Technique: hold lame at 30-45 degr...
Leverage Valtio's proxy magic for state. Usage: 1. proxy() creates mutable state. 2. Direct property mutations. 3. snapshot() for immutable reads. 4. useSnapshot hook in React. 5. subscribe() for listeners. 6. Nested objects auto-tracked. 7. Derive computed values. 8. Works outside React. Simple men...
Use Redux Toolkit for efficient Redux. APIs: 1. configureStore with defaults. 2. createSlice for reducers and actions. 3. Immer for immutable updates. 4. createAsyncThunk for async logic. 5. RTK Query for data fetching. 6. Entity adapter for normalized data. 7. TypeScript inference. 8. DevTools exte...
Prepare effective board meetings. Deck structure: 1. Business updates (metrics dashboard). 2. Progress since last meeting. 3. Highlight wins. 4. Key challenges and asks. 5. Strategic initiatives. 6. Financial performance. 7. Team updates. 8. Looking ahead. Send materials in advance. Be transparent a...
Implement reactive programming with MobX. Concepts: 1. makeObservable or makeAutoObservable. 2. @observable for tracked properties. 3. @computed for derived values. 4. @action for state mutations. 5. observer() HOC for React. 6. reaction() for side effects. 7. runInAction for async updates. 8. Decor...
Model complex logic with XState. Machine structure: 1. States and transitions. 2. Context for extended state. 3. Actions on entry/exit. 4. Guards for conditional transitions. 5. Services for async invocations. 6. Parallel states. 7. History states. 8. Visualize with @xstate/inspect. Use for multi-st...
Personalize outbound emails efficiently. Research (2-3 mins per prospect): 1. Recent LinkedIn post or company news. 2. Mutual connections. 3. Technology they use (BuiltWith, SimilarWeb). 4. Recent job postings (indicates growth/pain). Personalization tiers: High-value accounts (custom per person): '...
Sell on value, not features. Discovery questions for value: 1. 'What's the cost of the current problem?' (time, money, opportunity). 2. 'What happens if you don't solve this?' (quantify downside). 3. 'How would solving this impact the business?' (revenue increase, cost reduction, risk mitigation). C...