Building FAQ accordion? Writing 50 lines of JavaScript? HTML does it natively. What is HTML5? HTML5 is the latest version of HTML… Already expanded Use ‘open’ attribute to start expanded Features: Click to expand/collapse. Keyboard accessible. SEO-friendly (content readable by search engines). Style: Use CSS to customize summary arrow, […]
Author: ErcanOPAK
HTML5: Use
CSS: Use :has() for Parent Selectors
Need to style parent based on child? Impossible in CSS. Was. /* Style form if it has an error */ form:has(.error) { border: 2px solid red; } /* Style card if image is loading */ .card:has(img[loading]) { opacity: 0.5; } /* Style container if checkbox is checked */ .container:has(input:checked) { background: green; } Browser Support: […]
Windows 11: Use God Mode for All Settings in One Place
Can’t find setting. Buried 5 menus deep. Annoying. God Mode: All 200+ settings in one folder. Enable: 1. Create new folder on desktop 2. Rename to: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} 3. Icon changes → Open it Result: Every Windows setting alphabetically listed. No hunting. Tip: Pin to Start or Taskbar for quick access.
Windows 11: Use Clipboard History for Multiple Copies
Copy text. Copy another. First one lost. Frustrating. Clipboard History: Stores last 25 items. Enable: Settings → System → Clipboard → Turn on Clipboard history Use: Win + V → Shows clipboard history → Click to paste Pin Items: Pin frequently used text (email signatures, code snippets). They stay forever. Sync: Enable sync to access […]
AI Prompt: Convert Figma Design to Tailwind Classes
Designer sends Figma mockup. You need exact Tailwind classes. [Upload Figma screenshot] Convert this design to Tailwind CSS classes: Provide exact classes for: – Spacing (margin, padding) – Colors (bg, text, border) – Typography (font size, weight, line height) – Layout (flex, grid) – Responsive breakpoints Output as ready-to-use className strings. Result: Copy-paste Tailwind classes. […]
AI Prompt: Explain Git Conflicts in Plain English
Git conflict appears. Cryptic markers. No idea what to keep. Explain this git conflict: [Paste conflict with <<<<<<< ======= >>>>>>>] Explain in plain English: 1. What each version is trying to do 2. Which version to keep (and why) 3. How to merge them properly 4. The safe resolution I’m not a Git expert, make […]
AI Prompt: Generate API Documentation from Code
Wrote API. Need docs. Don’t want to write manually. Takes hours. Generate API documentation: [Paste code: controllers, models, routes] Format as OpenAPI 3.0 spec with: – Endpoint descriptions – Request/response schemas – Example requests/responses – Error codes – Authentication requirements Make it Postman/Swagger ready. Output: Complete OpenAPI YAML. Import to Swagger UI. Done. Bonus: Ask […]
Docker: Use docker system prune to Reclaim Disk Space
Docker using 50GB disk space. Old images, stopped containers, unused volumes everywhere. # Remove everything unused (safe) docker system prune -a # Also remove volumes (careful!) docker system prune -a –volumes # See what will be removed first docker system df What Gets Removed: – Stopped containers – Unused images – Dangling build cache – […]
Kubernetes: Use kubectl get events to Debug Pod Issues
Pod won’t start. kubectl describe pod shows nothing useful. What happened? Events: Kubernetes event log shows everything. # All events in namespace kubectl get events –sort-by=’.lastTimestamp’ # Filter by pod kubectl get events –field-selector involvedObject.name=my-pod # Watch live events kubectl get events –watch Common Issues Revealed: – Image pull failures – OOMKilled (out of memory) […]
WordPress: Use Autoptimize to Minify CSS/JS Without Coding
PageSpeed says ‘Minify CSS/JS’. You don’t know how. Hire developer? $500. Autoptimize Plugin: Free, automatic minification. Install: Plugins → Add New → Autoptimize → Install Settings: ✓ Optimize JavaScript ✓ Optimize CSS ✓ Optimize HTML ✓ Aggregate inline JS/CSS Result: CSS/JS files combined & minified. PageSpeed score +20 points. Advanced: Enable Critical CSS for above-fold […]
WordPress: Disable Pingbacks to Stop Comment Spam
Getting 500 spam comments daily? Most are pingback spam from scrapers. Disable Pingbacks: // functions.php add_filter(‘wp_headers’, function($headers) { unset($headers[‘X-Pingback’]); return $headers; }); add_filter(‘xmlrpc_enabled’, ‘__return_false’); add_filter(‘wp_xmlrpc_server_class’, ‘__return_false’); Settings: Settings → Discussion → Uncheck ‘Allow link notifications from other blogs’ Result: 90% less spam. No legitimate functionality lost.
Photoshop: Use Smart Objects to Keep Effects Editable
Applied filters to layer. Client wants changes. Filters are baked in. Start over. Smart Objects – Non-destructive everything. Convert: Right-click layer → Convert to Smart Object Benefits: – Filters stay editable (Smart Filters) – Resize without quality loss – Edit once, updates everywhere – Preserve original Example: Logo in 10 places. Make logo Smart Object. […]
Photoshop: Use Layer Comps to Save Multiple Design Variations
Client wants to see 5 different logo variations. You duplicate the file 5 times. Now edits mean updating 5 files. Layer Comps – Save layer visibility/position states in one file. How: Window → Layer Comps → Create New Layer Comp (saves current layer state) Workflow: 1. Design variation 1 → Save Layer Comp ‘Red Logo’ […]
Visual Studio: Use Solution Filters to Load Only What You Need
Huge solution with 100 projects? Loading takes 5 minutes. Your PC fans scream. You only need 3 projects. Solution Filters (.slnf) – Load subset of projects. Right-click solution → Create Solution Filter Select only projects you need → Save as MyWork.slnf Open MyWork.slnf instead of full .sln Result: 5 minute load → 20 seconds Use […]
C#: Use Span for Zero-Allocation String Operations
🚀 Zero-Copy Strings Substring creates new string (allocation). Span slices without copying. // ❌ Allocates memory string text = “Hello, World!”; string hello = text.Substring(0, 5); // New string // ✅ Zero allocation ReadOnlySpan span = text.AsSpan(); ReadOnlySpan hello = span.Slice(0, 5); // No copy! // Parsing without allocation ReadOnlySpan numbers = “123,456,789”.AsSpan(); var parts […]
C#: Use required Modifier to Enforce Property Initialization
✅ Compile-Time Validation Forget to set a property? Null reference exception at runtime. Required modifier catches at compile time. // C# 11+ public class User { public required string Name { get; init; } public required string Email { get; init; } public string? Phone { get; init; } // Optional } // ✅ Valid […]
C#: Use Pattern Matching with switch Expressions
🎯 Modern Switch Old switch statements verbose. Switch expressions compact, powerful. // Old way string result; switch (value) { case 1: result = “One”; break; case 2: result = “Two”; break; default: result = “Other”; break; } // Modern way var result = value switch { 1 => “One”, 2 => “Two”, _ => “Other” […]
C#: Use init Accessors for Immutable Objects with Object Initializers
🔒 Immutable + Flexible Readonly properties need constructor parameters. Init accessors let you use object initializers. // C# 9+ public class User { public int Id { get; init; } public string Name { get; init; } public string Email { get; init; } } // Can set during initialization var user = new User […]
SQL: Use CROSS APPLY for Correlated Subqueries Performance
⚡ Faster Correlated Queries Correlated subqueries in SELECT run for every row. CROSS APPLY runs once. — ❌ SLOW (subquery runs per row) SELECT c.Name, (SELECT TOP 1 OrderDate FROM Orders WHERE CustomerId = c.CustomerId ORDER BY OrderDate DESC) AS LastOrder FROM Customers c; — ✅ FAST (CROSS APPLY optimized) SELECT c.Name, o.OrderDate FROM Customers […]
SQL: Use CTEs for Readable Complex Queries
📖 Readable SQL Nested subqueries hurt readability. CTEs (Common Table Expressions) make complex queries clear. — Clear, readable, step-by-step WITH ActiveUsers AS ( SELECT * FROM Users WHERE IsActive = 1 ), RecentOrders AS ( SELECT * FROM Orders WHERE CreatedAt > DATEADD(month, -1, GETDATE()) ) SELECT u.Name, COUNT(o.OrderId) AS OrderCount FROM ActiveUsers u LEFT […]
.NET Core: Use IHostedService for Startup/Shutdown Logic
🎬 Lifecycle Hooks Run code on app start/stop. Warm cache, close connections cleanly. public class StartupService : IHostedService { public async Task StartAsync(CancellationToken cancellationToken) { // Runs when app starts await WarmCacheAsync(); await CheckDatabaseConnectionAsync(); } public async Task StopAsync(CancellationToken cancellationToken) { // Runs when app stops (graceful shutdown) await FlushLogsAsync(); await CloseConnectionsAsync(); } } // […]
.NET Core: Use IMemoryCache for In-Memory Caching Without Redis
⚡ Built-in Cache Redis overkill for small apps. IMemoryCache built into .NET. Zero config. // Startup services.AddMemoryCache(); // Usage public class UserService { private readonly IMemoryCache _cache; public async Task GetUserAsync(int id) { return await _cache.GetOrCreateAsync( $”user-{id}”, async entry => { entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5); return await _db.Users.FindAsync(id); } ); } } When It’s Enough: Single […]
Git: Use git reflog to Recover Deleted Commits
💾 Git’s Time Machine Accidentally deleted branch? Reset to wrong commit? Reflog saves you. # View all HEAD movements (last 90 days) git reflog # Output shows: # abc1234 HEAD@{0}: reset: moving to HEAD~1 # def5678 HEAD@{1}: commit: Important work ← You want this! # Restore that commit git checkout def5678 git checkout -b recovery-branch […]
Git: Use git bisect to Find Bug-Introducing Commit in Minutes
🔍 Binary Search for Bugs Bug appeared somewhere in last 100 commits. Which one? Bisect finds it in 7 tries (log₂ 100). git bisect start git bisect bad # Current commit has bug git bisect good abc1234 # This old commit was fine # Git checks out middle commit # You test: does bug exist? […]
AJAX: Use FormData to Upload Files with Progress
📤 File Upload with Progress Bar Upload files + show progress. Native browser API. No libraries. const formData = new FormData(); formData.append(‘file’, fileInput.files[0]); formData.append(‘userId’, ‘123’); const xhr = new XMLHttpRequest(); // Progress tracking xhr.upload.addEventListener(‘progress’, (e) => { const percent = (e.loaded / e.total) * 100; progressBar.style.width = percent + ‘%’; }); xhr.open(‘POST’, ‘/upload’); xhr.send(formData); With […]
JavaScript: Use AbortController to Cancel Fetch Requests
🛑 Cancel In-Flight Requests User navigates away mid-request. Old request completes, updates wrong page. Prevent this. const controller = new AbortController(); fetch(‘/api/data’, { signal: controller.signal }) .then(res => res.json()) .catch(err => { if (err.name === ‘AbortError’) { console.log(‘Request cancelled’); } }); // User navigates away controller.abort(); // Cancels request React Hook: Use in useEffect cleanup. […]
HTML5: Use
📝 Native Autocomplete Building autocomplete dropdown? No React Select needed. HTML does it natively. Dynamic Options: Populate datalist with JavaScript/API. Still native rendering. Browser Support: 97% (all modern browsers). Benefit: Zero bytes JavaScript, accessible by default, mobile keyboard optimized.
CSS: Use @layer to Control Cascade Order Without !important
🎯 Cascade Control !important is tech debt. @layer organizes CSS priority cleanly. @layer reset, base, components, utilities; @layer reset { * { margin: 0; padding: 0; } } @layer base { body { font-family: sans-serif; } } @layer components { .button { background: blue; } } @layer utilities { .mt-4 { margin-top: 1rem; } } […]
Windows 11: Use Focus Sessions with Spotify Integration
⏱️ Built-in Pomodoro Timer Clock app now has focus timer + Spotify playlists. Free productivity app built into Windows. Use: Clock app → Focus Sessions Features: 25-minute timer, break reminders, daily goal tracking, Spotify integration (auto-plays focus playlists). DND Mode: Turns on Do Not Disturb automatically during session. Track Progress: Daily/weekly stats show total focus […]
Windows 11: Use Virtual Desktops for Context-Separated Workflows
🖥️ Multiple Workspaces One desktop for work, one for personal, one for each project. Switch instantly. Create: Win + Tab → New Desktop Switch: Ctrl + Win + Left/Right Arrow Move Window: Win + Tab → Drag window to desktop My Setup: Desktop 1: Code (VS Code + terminals) Desktop 2: Design (Figma + Photoshop) […]




















