Skip to main content

Posts

Showing posts from June, 2025

Making vanilla web-fontend (project with lit, web component) secured (discussions with chatGpt)

Query: I wn complete seperate .css/.scss and .html template file for my webcomponent.js like in angular. But with complete security. In lit. Use any js lib like domPurify, etc. But I wan complete safety. How? ChatGPT said: Thought for 16s Totally doable. Here’s a secure Lit setup with fully separate .html + .scss files , sanitized with DOMPurify , and rendered into the Shadow DOM without sacrificing performance. Folder layout src / lib/ safe- html .js components/ app-shell .html app-shell .scss app-shell .js 1) Install deps npm i dompurify npm i -D sass Vite will compile .scss . We’ll import the compiled CSS as text and attach it via adoptedStyleSheets (fast + memory-friendly). 2) app-shell.html (pure template file) Put your Carbon UI Shell markup here (no scripts). Example stub: < cds-header aria-label = "My App" > < cds-header-name prefix = "IBM" >[Platform] </ cds-header-name > < cds-header-glo...

Wired vs Wifi usb multiplexer (chatGpt discussions)

Query: wired usb multiplexer vs wifi usb multiplexer for laptop ChatGPT said: Here’s a clear comparison of wired USB multiplexer vs Wi-Fi (wireless) USB multiplexer for use with a laptop — with focus on performance, reliability, latency, security , and use case suitability : 🔌 Wired USB Multiplexer (e.g. USB switch, USB sharer, or USB over IP via cable) ✅ Pros: Low Latency & High Speed : Offers native USB 2.0/3.0 speeds (up to 5-10 Gbps). Plug-and-Play : Generally no drivers or software needed. No Interference : Immune to wireless signal issues. Stable Power Delivery : Can reliably power USB devices (like cameras, storage). ❌ Cons: Limited Range : USB cables are typically limited to 2-5 meters. More Cables : Messier setup, especially in multi-device scenarios. Manual Switching (sometimes) : Cheaper models may require a physical button press to switch host access. 🧠 Suitable for: Latency-sensitive tasks (e.g. debugging, flashing firmware). H...

Eating/Consuming Kathal/ Jackfruit precautions (chatGpt discussions)

Query: Is "Kathal" n "Jack fruit" same? ChatGPT said: Yes, "Kathal" and "Jackfruit" are the same fruit . "Kathal" (कठल) is the Hindi name commonly used in India. "Jackfruit" is the English name. Scientific Info: Botanical name : Artocarpus heterophyllus Family : Moraceae (same family as mulberry and fig) Notes: It is the largest tree-borne fruit in the world. Eaten raw (as vegetable) when unripe (popular in Indian curries, biryani). Eaten ripe (as fruit) when yellow and sweet. Seeds are edible too (roasted, boiled, or in curries). If you're referring to them in any context—culinary, botanical, or grocery—they mean the same thing. You said: ripe jack fruit:"Kowa" How to eat? Various precautions based on scientific evidences, etc? Health benefits n side effects? Etc...? ChatGPT said: Ripe Jackfruit (called “Kowa” in some regions of India/Bangladesh): Full Guide Ripe jackfrui...