๐ Margin Outside, Padding Inside Spacing confuses beginners. Margin is outside the element. Padding is inside. Use margin for spacing elements, padding for spacing content. โ๏ธ Margin .box { margin: 20px; /* Space outside */ margin-top: 10px; margin-bottom: 10px; margin-left: 20px; margin-right: 20px; margin: 10px 20px; /* top/bottom, left/right */ margin: 10px 20px 30px 40px; […]
Author: ErcanOPAK
Windows 11: Configure Multiple Monitors for Productivity
๐ฅ๏ธ Two Monitors = 2x Productivity Multiple monitors boost productivity. Display settings configure extend, duplicate, primary monitor. Maximize screen real estate. ๐ง Display Settings Settings โ System โ Display Multiple displays: – Duplicate: Same on both monitors – Extend: Desktop across monitors – Second screen only: Use external only Identify: Shows which monitor is which […]
AI Prompt: Generate Social Media Content Calendar
๐ Plan a Month of Content in Minutes Content planning takes hours. AI generates content calendar โ topics, platforms, post types, hashtags. Ready to execute. ๐ The Prompt Generate a 30-day social media content calendar for: Topic: [e.g., Productivity Tips for Developers] Target platforms: [Twitter, LinkedIn, Instagram, Facebook] Target audience: [e.g., Software Developers, Project Managers, […]
Docker: Use Docker Compose for Multi-Container Apps
๐ณ One Command, All Containers Managing containers individually is painful. Docker Compose defines and runs multi-container apps. One YAML file, one command. ๐ Docker Compose File version: ‘3.8’ services: web: build: . ports: – “8080:8080” environment: – DB_HOST=postgres – REDIS_HOST=redis depends_on: – postgres – redis postgres: image: postgres:15 environment: POSTGRES_PASSWORD: secret volumes: – postgres_data:/var/lib/postgresql/data redis: […]
Kubernetes: Use StatefulSets for Stateful Applications
WordPress: Create Custom Page Templates for Unique Layouts
๐ One Page, Different Layout Default page template is boring. Custom page templates create unique layouts. Landing pages, full-width, sidebar left/right. ๐ Creating Page Template // page-templates/landing.php <?php /* Template Name: Landing Page Description: Full-width landing page template */ get_header(); ?> <main id=”main” class=”site-main landing-page”> <?php while (have_posts()) : the_post(); the_content(); endwhile; ?> </main> <?php […]
Photoshop: Save and Load Presets for Consistency
๐พ One Click, Perfect Settings Recreating settings every time is tedious. Presets save your settings. Curves, Levels, Layer Styles โ reuse with one click. ๐ Saving Presets 1. Open adjustment layer (Curves, Levels, etc.) 2. Adjust settings 3. Click the gear icon โ Save Preset 4. Name your preset 5. Click Save Or: 1. Layer […]
Visual Studio: Toggle Line Comments with Ctrl + K, Ctrl + C/U
๐ฌ Comment and Uncomment Faster Manually adding // to each line is slow. Ctrl + K, Ctrl + C comments. Ctrl + K, Ctrl + U uncomments. Essential for debugging. โจ๏ธ Shortcuts Ctrl + K, Ctrl + C โ Comment selection Ctrl + K, Ctrl + U โ Uncomment selection Ctrl + Shift + / […]
C#: Use Exception Filtering to Catch Specific Exceptions
๐ฏ Catch Only When Condition Is True Catching all exceptions can hide bugs. Exception filtering (when) catches only when conditions met. More precise error handling. โ Without Filter try { // code } catch (Exception ex) { // Catches everything } โ With Filter try { // code } catch (Exception ex) when (ex.Message.Contains(“timeout”)) { […]
C#: Use Extension Methods to Extend Existing Types
โ Add Methods Without Changing Original Class Can’t modify string class? Extension methods add methods. Like IsValidEmail() for string. Clean, discoverable. โ Before string email = “test@example.com”; bool valid = IsValidEmail(email); โ Extension Method string email = “test@example.com”; bool valid = email.IsValidEmail(); ๐ Creating Extensions public static class StringExtensions { // Extend string public static […]
SQL: Understand Database Normalization (1NF, 2NF, 3NF)
๐ Normalization = Organized Data Bad design = duplicate data, anomalies. Normalization organizes data. 1NF, 2NF, 3NF โ reduce redundancy, improve integrity. ๐ First Normal Form (1NF) โ Not 1NF (repeating groups) Order: 1, Customer: Alice, Products: Laptop, Phone, Tablet โ 1NF (atomic values, separate rows) OrderID Customer Product 1 Alice Laptop 1 Alice Phone […]
.NET Core: Use API Controllers for RESTful Services
๐ Build REST APIs with Controllers REST APIs need structure. API Controllers handle HTTP requests. GET, POST, PUT, DELETE โ clean and organized. ๐ Basic API Controller [ApiController] [Route(“api/[controller]”)] public class UsersController : ControllerBase { private readonly IUserService _userService; public UsersController(IUserService userService) { _userService = userService; } [HttpGet] public async Task GetUsers() { var users […]
Git: Use Git Add to Stage Changes for Commit
๐ฆ git add = Stage Changes Changed files need staging. git add stages changes for commit. Select what to commit, commit later. ๐ Git Add Commands # Stage all changes git add . # Stage specific file git add file.txt # Stage multiple files git add file1.txt file2.txt # Stage all .js files git add […]
Ajax: Send Custom Headers with Requests
๐ Headers = Request Metadata API needs authentication, content type, custom data. Request headers send additional info. Essential for API integration. ๐ Sending Headers // Fetch with headers const response = await fetch(‘/api/data’, { headers: { ‘Content-Type’: ‘application/json’, ‘Authorization’: ‘Bearer your-token’, ‘X-API-Key’: ‘your-api-key’, ‘Accept’: ‘application/json’ } }); // With authentication const token = ‘jwt-token-here’; await […]
JavaScript: Use setTimeout and setInterval for Timers
โฐ Timers = Delayed or Repeated Execution Need to delay execution? Run repeatedly? setTimeout and setInterval handle timing. Animations, polling, delays. ๐ setTimeout (Delay) // Execute after 2 seconds setTimeout(() => { console.log(‘2 seconds passed’); }, 2000); // With parameters setTimeout((name) => { console.log(`Hello ${name}`); }, 1000, ‘Alice’); // Clear timeout const timer = setTimeout(() […]
HTML: Use Tables for Tabular Data
๐ Tables = Tabular Data Tables display data in rows and columns. <table> is for tabular data, not layout. Use for reports, dashboards. ๐ Basic Table <table> <thead> <tr> <th>Name</th> <th>Age</th> <th>Country</th> </tr> </thead> <tbody> <tr> <td>Alice</td> <td>30</td> <td>USA</td> </tr> <tr> <td>Bob</td> <td>25</td> <td>UK</td> </tr> </tbody> <tfoot> <tr> <td>Total</td> <td>2</td> <td></td> </tr> </tfoot> </table> ๐ฏ […]
CSS: Understand Display Property โ Block, Inline, Flex, Grid
๐ Display = Layout Behavior display: block vs inline vs flex vs grid. Understanding display is key to CSS layouts. Choose the right one. ๐ Display Values /* Block: Takes full width, starts new line */ .block { display: block; width: 100%; } /* Inline: Takes only needed width, no new line */ .inline { […]
Windows 11: Use Windows Security as Your Antivirus
๐ก๏ธ No Need for Third-Party Antivirus Windows Security is built-in. Real-time protection, virus scanning, firewall. Enough for most users. No need to buy antivirus. ๐ง Windows Security Features Settings โ Privacy & Security โ Windows Security Core features: – Virus & threat protection (real-time scanning) – Account protection (Windows Hello, sign-in) – Firewall & network […]
AI Prompt: Summarize Meeting Notes and Action Items
๐ Turn Meeting Notes into Action Plans Meeting notes are messy. AI summarizes meetings โ key decisions, action items, next steps. Share instantly. ๐ The Prompt Summarize these meeting notes: [Paste meeting notes or transcript here] Meeting type: [Daily Standup / Sprint Planning / Client Review / Team Sync] Create a summary with: 1. Meeting […]
Docker: Dockerfile Best Practices for Smaller, Faster Images
๐ฆ Write Efficient Dockerfiles Bad Dockerfiles = large images, slow builds. Best practices reduce image size, speed up builds, improve security. โ Bad Dockerfile FROM node:18 WORKDIR /app COPY . . RUN npm install RUN npm run build CMD [“npm”, “start”] # 1.2GB image, slow builds โ Good Dockerfile FROM node:18-alpine AS builder WORKDIR /app […]
Kubernetes: Use HPA to Auto-Scale Pods Based on Load
๐ Scale Pods Automatically Fixed replicas waste resources. HorizontalPodAutoscaler scales pods based on CPU/memory. Scale up during load, down during low traffic. ๐ HPA Configuration apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: myapp-hpa spec: scaleTargetRef: apiVersion: apps/v1 kind: Deployment name: myapp minReplicas: 2 maxReplicas: 10 metrics: – type: Resource resource: name: cpu target: type: Utilization averageUtilization: […]
WordPress: Use Custom Fields to Store Additional Post Data
๐ฆ Store Extra Data with Posts Posts need extra data. Custom fields (post meta) store additional information. Product price, event date, author bio. ๐ Using Custom Fields // Add custom field add_post_meta($post_id, ‘product_price’, 99.99, true); // Update custom field update_post_meta($post_id, ‘product_price’, 89.99); // Get custom field $price = get_post_meta($post_id, ‘product_price’, true); // Get all custom […]
Photoshop: Use Selective Color for Precise Color Grading
๐จ Cinema-Grade Color Control Adjust individual colors without affecting others. Selective Color gives cinema-grade control. Perfect for color grading. ๐ Using Selective Color 1. Adjustment Layer โ Selective Color Colors to adjust: – Reds – Yellows – Greens – Cyans – Blues – Magentas – Whites – Neutrals – Blacks Each color has: – Cyan […]
Visual Studio: Use PerfTips to See Method Execution Time
โฑ๏ธ Know How Long Your Code Takes Slow code needs profiling. PerfTips shows method execution time during debugging. Identify bottlenecks instantly. ๐ง Using PerfTips 1. Start debugging (F5) 2. Step through code (F10, F11) 3. PerfTips appear next to method calls 4. Shows elapsed time in milliseconds PerfTips show: – Total execution time – Time […]
C#: Use Static Members for Class-Level Data
๐ฆ Static = Shared Across All Instances Instance members belong to objects. Static members belong to the class. Shared state, utility methods, global config. ๐ Instance public class Counter { public int Count { get; set; } } var c1 = new Counter(); c1.Count = 1; var c2 = new Counter(); c2.Count = 2; // […]
C#: Use Encapsulation to Protect Data
๐ Encapsulation = Hide Internal State Public fields break encapsulation. Private fields + public properties protect data. Validation, computed values, change tracking. โ No Encapsulation public class User { public string Name; // Direct access public int Age; // No validation } // Any code can set invalid values user.Age = -5; // Valid but […]
SQL: DELETE vs TRUNCATE โ Know the Difference
๐๏ธ DELETE removes rows. TRUNCATE removes all rows. Both remove data. DELETE can use WHERE, fires triggers. TRUNCATE is faster, resets identity, cannot use WHERE. ๐ DELETE DELETE FROM users WHERE id = 123; DELETE FROM users WHERE status = ‘inactive’; – Can use WHERE (selective) – Fires triggers – Slower (logs each row) – […]
.NET Core: Use Identity for User Authentication
๐ Identity = Built-in Authentication User login, registration, password reset. ASP.NET Core Identity handles it all. Secure, extensible, built-in. ๐ Setup Identity # Install packages dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore dotnet add package Microsoft.EntityFrameworkCore.SqlServer # Program.cs builder.Services.AddDbContext(options => options.UseSqlServer(connectionString)); builder.Services.AddIdentity() .AddEntityFrameworkStores() .AddDefaultTokenProviders(); builder.Services.Configure(options => { // Password settings options.Password.RequireDigit = true; options.Password.RequiredLength = 8; options.Password.RequireNonAlphanumeric = […]
Git: Use Git Init to Create a New Repository
๐ git init = Start Version Control New project? git init creates .git folder. Start tracking changes. Essential for any project. ๐ Git Init # Initialize repository git init # Initialize in specific directory git init my-project # Initialize with default branch name git init –initial-branch=main # Initialize bare repository (for server) git init –bare […]
Ajax: Understand HTTP Status Codes
๐ HTTP Status Codes = Server’s Response 200 OK, 404 Not Found, 500 Server Error. Status codes tell what happened. Know them for debugging. ๐ Status Code Groups 2xx: Success – 200 OK: Request successful – 201 Created: Resource created – 204 No Content: Success, no response body 3xx: Redirection – 301 Moved Permanently: URL […]













