- Daily Sandbox
- Posts
- 🚀 Daily Digest: Why Web Components Aren't the Future and How to Master CSS Hover Effects
🚀 Daily Digest: Why Web Components Aren't the Future and How to Master CSS Hover Effects
PLUS: Optimize Docker Images and Discover AI Agents, Code Editors, and More in Today’s Coding Toolbox
Daily Issue #41
🎆 NEWS, INNOVATIONS, TRENDS, TUTORIALS
Web Components Are Not the Future
CSS Directional Hover without using JavaScript
.top:hover span {
top: 50px;
animation: movefromtop 0.25s;
}
How to Reduce Docker Image Size: Best Practices and Tips for DevOps Engineers
Why should we care about AI Agents instead of a single prompted LLM?
🧰 CODING TOOLBOX
goodshare.js - А useful modern JavaScript solution for share a link from your website to social networks or mobile messengers
trustfall - A query engine for any combination of data sources. Query your files and APIs as if they were databases!
bun - Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
phoenix - a modern open-source Code Editor for the web, built for the browser
humanify - deobfuscate Javascript code using ChatGPT
#️⃣ DO YOU AI PROMPT?
Travel Guide
I want you to act as a travel guide. I will write you my location and you will suggest a place to visit near my location. In some cases, I will also give you the type of places I will visit. You will also suggest me places of similar type that are close to my first location. My first suggestion request is "I am in London/UK and I want to visit only museums.
💻 CODE SNIPPET OF THE DAY
Retrieving Query Parameters from URL in JavaScript
Problem: I needed a quick and efficient way to extract the value of a query parameter from a URL
Solution: Implemented a simple function using regular expressions to retrieve the value of a specific query parameter from the current or provided URL
function getQueryByName(key, url = window.location.href) {
const queryNameRegExp = new RegExp(`[?&]${key}=([^&]*)(?:&|$)`);
const queryNameMatch = url.match(queryNameRegExp);
return queryNameMatch ? decodeURIComponent(queryNameMatch[1]) : null;
}
Keywords: JavaScript get query parameter, extract URL query string, URL parameter retrieval, query string parsing, JavaScript URL search params, decodeURIComponent in URLs, query string handling.
🛠️ SUGGEST A TOOL
If you have built anything that you’d like to share with the community, get with me on X @dailysandbox_ 😀
Reply