- Daily Sandbox
- Posts
- 🚀 Daily Digest: Unlock WebSockets and Chrome Extensions: Essential APIs and Cheat Codes for Developers
🚀 Daily Digest: Unlock WebSockets and Chrome Extensions: Essential APIs and Cheat Codes for Developers
PLUS: Build AI-Powered Apps, Scrape the Web, and Explore Node.js Tools in Today’s Coding Toolbox
Daily Issue #39
🎆 NEWS, INNOVATIONS, TRENDS, TUTORIALS
Discovering WebSockets with some Coding
How to Create a Chrome Extension Using JavaScript: A Beginner’s Guide
12 Essential Web APIs Every Developer Should Know
//localStorage
localStorage.setItem('userName', 'Vishal');
//payment API
const payment = new PaymentRequest([
{ supportedMethods: 'basic-card'}
]);
...
The Ultimate Dev Cheat Code Collection
🧰 CODING TOOLBOX
generative-ai-js - The official Node.js / Typescript library for the Google Gemini API
ai - Build AI-powered applications with React, Svelte, Vue, and Solid
crawlee - A web scraping and browser automation library for Node.js to build reliable crawlers
repopack - a powerful tool that packs your entire repository into a single, AI-friendly file
ai-jsx - The AI Application Framework for Javascript
#️⃣ DO YOU AI PROMPT?
Act as a Commit Message Generator
I want you to act as a commit message generator. I will provide you with information about the task and the prefix for the task code, and I would like you to generate an appropriate commit message using the conventional commit format. Do not write any explanations or other words, just reply with the commit message.
💻 CODE SNIPPET OF THE DAY
Maintaining Aspect Ratio with CSS object-fit: cover
Problem: I needed to ensure images fill their containers while maintaining their aspect ratio, preventing distortion or stretching.
Solution: I used the object-fit: cover property in CSS to resize images proportionally, ensuring they cover their container without losing their aspect ratio.
img {
object-fit: cover;
width: 100%;
height: 100%;
}
Keywords: CSS object-fit cover, image aspect ratio, responsive images, object-fit for images, maintain image proportions, CSS image resizing, full-width images.
🛠️ SUGGEST A TOOL
If you have built anything that you’d like to share with the community, get with me on X @dailysandbox_ 😀
Reply