Skip to main content

Posts

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...

How to set LD_LIBRARY_PATH path in Environment Variable for using cppcms (chatgpt ans)

 ### Option 1: Setting the `LD_LIBRARY_PATH` Environment Variable You can temporarily add the directory containing `libcppcms.so.2` to the `LD_LIBRARY_PATH` environment variable. ```sh export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./learnCppcms -c config.js ``` Replace `/usr/local/lib` with the actual path to the directory where `libcppcms.so.2` is installed. ### Option 2: Adding the Library Path to `/etc/ld.so.conf` For a more permanent solution, you can add the library directory to the `/etc/ld.so.conf` file and run `ldconfig` to update the linker cache. 1. Open `/etc/ld.so.conf` in a text editor with root permissions:     ```sh     sudo nano /etc/ld.so.conf     ``` 2. Add the directory containing `libcppcms.so.2` (e.g., `/usr/local/lib`). 3. Save the file and exit the text editor. 4. Run `ldconfig` to update the linker cache:     ```sh     sudo ldconfig     ``` ### Option 3: Using a Wrapper Script You can creat...

Supplier dropshipping websites in india?

  Here are some supplier dropshipping websites in India: Baapstore: One of the oldest dropshipping suppliers in India, offering a wide variety of products across many categories. Features a user-friendly platform for browsing products, placing orders, and tracking shipments. Spocket: A global dropshipping platform with a large selection of products from suppliers in India, the US, and Europe. Offers features like automated inventory syncing and order fulfillment. Dropshipzone: An Indian dropshipping supplier specializing in fashion apparel, accessories, and homeware. Provides competitive pricing and fast shipping within India. Ninjakart Seller Network: A logistics company that also offers dropshipping services for a variety of products. Provides warehousing, packaging, and shipping services for your dropshipping business. SaleHoo: A directory of verified dropshipping suppliers from around the world, including India. Offers a membership fee to access supplier contact infor...