teleren/devto huggingface dataset:
Learning AWS Day by Day — Day 58 — Security in API Gateway
Tags: aws, cloud, cloudcomputing, apigateway
Published: 2024-05-08 17:00:21

Exploring AWS !!

Day 58

Security in API Gateway

Security is one of the most important aspects. Security is the responsibility of both AWS and you, as being an AWS customer, AWS as well keeps your security as priority. The shared responsibility describes security in the cloud and of the cloud.
Security of the Cloud: AWS is responsible for the security of the cloud. It is responsible for all the infrastructure security that you are running on the cloud. Third party security validators often verify and test the security as part of the AWS Compliance Programs.
Security in the Cloud: You are responsible for the security inside the cloud of the infrastructures you provision, factors like strong password, sensitivity of data, laws and regulations of your company.

Data Protection
For your data protection , it is recommended to secure your sensitive information like password, protecting AWS account credentials, use IAM user policy, with least privilege given. You can secure your data in below ways:
Use MFA with each acoiunr, including IAM User account and root account.
Use SSL/TLS to communicate with resources.
Use CloudTrail for user activity logging and setting up API.
Use encryption solutions, and managed AWS advanced services like Macie which is used for securing data in S3.

Data Encryption in API Gateway
Data Encryption at Rest in API Gateway:
When enabling caching for REST API, you can enable cache encryption.
Data Encryption in Transit in API Gateway:
API gateway APIs expose only HTTPS endpoints only, doesn’t expose HTTP.
Manages certificate for default execute-api endpoints.
Can setup CloudFront distribution with custom SSL certificates and use it with regional APIs.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fa1z4kfdr1wxbcv0neiz.png)

Internetwork Traffic Privacy
We can create private REST APIs, that can be accessed only from VPCs. You can allow or deny access to APIs from specific VPCs or VPC endpoints. Each endpoint can be used to access multiple APIs. We can also use Direct Connect for establishing a network from on-prem to Amazon VPC and then access your private API over that network. In all of these scenarios, the traffic to your private API uses secure connection, and stay within Amazon network, isolated from public.
Primitive Data Types in Solidity
Tags: solidity, pragma, ethereum, smartcontract
Published: 2024-05-08 16:57:43

Here we introduce you to some primitive data types available in Solidity.

- boolean
- uint256
- int256
- address

```
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract Primitives {
     bool public boo = true;
    
     /*
     uint stands for unsigned integer, meaning non negative integers 
     different sizes are availabe

     uint8 ranges from 0 to 2 ** 8 -1
     uint16 ranges from 0 to 2 ** 16 -1
     ...
     uint256 ranges from 0 to 2 ** 256 -1
     */

     uint8 public u8 = 1;
     uint256 public u256 = 456;
     uint256 public u = 123; // uint is an alias for uint256

     /*
     Negative numbers are allowed for int types.
     Like uint, different ranges are available from int8 to int256

     int256 ranges from -2 ** 255 to 2 ** 255 - 1
     int128 ranges from -2 ** 127 to 2 ** 127 - 1 
     */

     int8 public i8 = -1;
     int256 public i256 = 456;
     int256 public i = -123; // int is same as int256

     // minimum and maximum of int
     int256 public minInt = type(int256).min;
     int256 public maxInt = type(int256).max;

     address public addr = 0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c;

     /*
     In Solidity, the data type byte represent a sequence of bytes.
     Solidity presents two type of bytes types:
     
     - fixed-sized byte arrays
     - dynamically-sized byte arrays

     The term bytes in Solidity represents a dynamic array of bytes.
     It's a shorthand for byte[].
     */

     bytes1 a = 0xb5;
     bytes1 b = 0x56;

     // Default values
     // Unassigned variables have a default value
     bool public defautlBoo; // false
     uint256 public defualtUint; // 0
     int256 public defaultInt; // 0
     address public defautlAddr; // 0x0000000000000000000000000000000000000000
}
```
Mastering Favicon Implementation: A Comprehensive Guide.
Tags: beginners, programming, tutorial, html
Published: 2024-05-08 16:50:29

Have you ever properly added favicons to your web projects? They may be small, but their impact on branding and user experience is huge. In this guide, we'll unravel the secrets of mastering favicon implementation.

### What is Favicon & Why is it important to add to the project?

In web design, a favicon, or "favorite icon," is a small, square image that visually represents a website. It benefits the project in terms of Brand Recognition, Enhanced User Experience, Professionalism, Increased Website Visibility, Consistency Across Devices, Improved SEO, etc.

### Steps to Adding a Favicon to a Website:

1. **Prepare Favicon Images:**
    - Take the logo of your website and create four versions of it in different sizes: 64x64, 180x180, 192x192, and 512x512 pixels. Save these images in a suitable directory within your project folder.
2. **Link Favicon in HTML:**
    - Inside the `<head>` section of your HTML document, add the following `<link>` tags to attach the favicon images:
    
    ```html
    <link rel="icon" href="images/favicons/favicon-64.png" />
    <link rel="apple-touch-icon" href="images/favicons/apple-touch-icon.png" />
    <link rel="manifest" href="manifest.webmanifest" />
    ```
    
    > Replace `"images/favicons/favicon-64.png"` with the appropriate file path for your favicon images.
    > 
3. **Create manifest.webmanifest File:**
    - Create a new file named `manifest.webmanifest` in your project directory.
    - Inside the `manifest.webmanifest` file, add the following JSON structure:
    
    ```json
    {
      "icons": [
        {
          "src": "images/favicons/favicon-192.png",
          "type": "image/png",
          "sizes": "192x192"
        },
        {
          "src": "images/favicons/favicon-512.png",
          "type": "image/png",
          "sizes": "512x512"
        }
      ]
    }
    
    ```
    
    > Ensure that the `"src"` paths match the location of your favicon images.
    > 
4. **Favicon Deployment:**
    - Once all the necessary files and links are in place, deploy your website to make the favicon visible to users.

### Additional Notes:

- The favicon images should be appropriately sized to ensure optimal display on various devices and platforms.
- The `apple-touch-icon` link is used for Apple devices and should typically be a square image in PNG format.
- The `manifest.webmanifest` file provides metadata about the web application, including icons for different screen sizes and platforms.

By following these steps, you can successfully add a favicon to your website, enhancing its visual appeal and branding.
Hi 👋, I'm thawingx
Published: 2024-05-08 16:45:45


<h3 align="center">A software engineer, specializing in full-stack development, with a strong emphasis on front-end</h3>

<p align="left"> <img src="https://komarev.com/ghpvc/?username=thawingx&label=Profile%20views&color=0e75b6&style=flat" alt="thawingx" /> </p>

- 🔭 I’m currently working on **Huawei**

- 👯 I’m looking to collaborate on **AI application and automated shot vedio(tiktok etc.) operations pipeline**

- 📫 How to reach me **thawingx@gmail.com**



<p><img align="left" src="https://github-readme-stats.vercel.app/api/top-langs?username=thawingx&show_icons=true&locale=en&layout=compact" alt="thawingx" /></p>

<p>&nbsp;<img align="center" src="https://github-readme-stats.vercel.app/api?username=thawingx&show_icons=true&locale=en" alt="thawingx" /></p>
Encode/Decode emojis into/from base64
Published: 2024-05-08 12:00:33

Many users like to use emojis when posting messages to your website. As Web developer we should allow and encourage such kind of usage. Because it's funny!😊

And some websites may have the need retrieving messages from backend being base64-coded.

But most of emojis are `UTF-16` code. base64 can only work with `UTF-8` or `ASCII` code. You can't encode `UTF-16` into base64 directly!

The idea is to convert the text containing emojis into a piece of intermediate code in the form of `ASCII` first!

If you use `JavaScript` at both ends, you can do this:

Backend:
1. `TextEncoder().encode()` the text.
2. `base64` encode.
3. Save into DB and over to Frontend.

Frontend:
1. Retrieve encoded text from Backend.
2. `base64` decode.
3. `TextDecoder().decode`.

Then you'll see the emojis. 😀

But if you use another language at backend, say `PHP`, you don't always find an alternative of `TextEncoder` there. Instead we can use URL encoding/decoding at backend/frontend.

Document of `encodeURIComponent()` says:
```
It encodes a URI by replacing each instance of certain characters 
by one, two, three, or four escape sequences representing the 
UTF-8 encoding of the character
```

In other words, it converts emojis code into `ASCII`, which is perfectly compitable with base64. Here is what we can do:

Backend(PHP):
1. `rawurlencode()` the text.
2. `base64_encode()` encode.
3. Save into DB and over to Frontend.

Frontend(JavaScript):
1. Retrieve encoded text from Backend.
2. `atob()`(base64 decode)
3. `decodeURIComponent()`.

Then we can see the emojis on webpage, even mixed with other UTF-8 text. 😎
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6gq3aci27vekhox3oxvh.png)
Untersuchen Sie, wie sie Ihre Glucoslim Gummies-Versuche beeinflussen könnten?
Published: 2024-05-08 16:41:35

Offizielle Website:- https://top10gummies.com/glucoslim-gummies-germany-offer/

Glucoslim Gummies:- 

Es gibt eine Vielzahl von Anwendungen für den in Glucoslim Gummies enthaltenen Essig. Erfahren Sie alles über die Vorteile von Essigsäure. Jüngste Studien haben gezeigt, dass diese wirksame Substanz Ihren Stoffwechsel ankurbeln kann, was Ihnen wiederum beim Abnehmen helfen kann.

PDF.Site:- https://issuu.com/simonchene/docs/glucoslim_gummies 
https://anyflip.com/qyssb/bkfn 
https://flipbooklets.com/pdfflipbooklets/glucoslim-gummies 
https://publuu.com/flip-book/494653/1110388 
https://online.fliphtml5.com/lrtik/wtvh/ 

Offizielle Blogs:- 
https://glucoslim-gummies-germany.jimdosite.com/ 
https://sites.google.com/view/glucoslim-gummies-germany/ 
https://glucoslim-gummies-germany.blogspot.com/2024/05/glucoslim-gummies-germany.html 
https://medium.com/@simonchene/glucoslim-gummies-2024-bewertungen-gef%C3%A4lscht-entlarvt-gegen-gewichtsverlust-ist-es-sicher-und-7c91820d1656 
https://medium.com/@simonchene/glucoslim-gummies-funktioniert-es-in-ihrem-k%C3%B6rper-oder-nicht-lesen-sie-erstaunliche-rezensionen-2bf538327170 
https://in.pinterest.com/pin/1037305726663893038/ 
https://glucoslim-gummies-germany.hashnode.dev/glucoslim-gummies-weight-loss-review-hilft-ihnen-sich-den-ganzen-tag-uber-frohlicher-inspirierter-und-konzentrierter-zu-fuhlen 
https://sketchfab.com/3d-models/glucoslim-gummies-bewertungen-a9202e29184b44f9a9afa06d7e480095 
https://glucoslim-gummies-germany.company.site/ 
https://www.linkedin.com/events/glucoslimgummiesreview-gewichts7193274069985746945/ 
https://gamma.app/docs/Glucoslim-Gummies-BEWERTUNGEN-SCHOCKIERENDE-NACHRICHTEN-UBER-NEBE-ftt7heaaunbu41o 
https://glucoslimgummiesgermany.godaddysites.com/ 
https://soundcloud.com/simonchene/glucoslim-gummies-bewertung-funktioniert-es-was-zu-erwarten-ist 
https://groups.google.com/g/glucoslim-gummies-price/c/84Qkv2gWCSA 
https://ecosoft.microsoftcrmportals.com/en-US/forums/general-discussion/79cba4a3-c30b-ef11-a81c-6045bda1d753 
https://www.latinoleadmn.org/group/leadership-action-team/discussion/147c4697-20e7-40f0-bc5b-336c94b05274 
https://www.quanshotit.com/group/quanshotit-group/discussion/16945646-c1b5-4da1-bd95-bc28cec693ed 
https://www.cbaps.org/group/grupo-cbaps/discussion/eb2b0a37-5069-474e-bf77-061616dd8b4e 
https://www.irvac.org/group/mysite-200-group/discussion/a2996386-9f3d-43d7-9d92-00f32647b1d3 
https://www.myrtlebeastocr.com/group/gear-accessories/discussion/c72bcbd0-3e89-4dc2-82ff-b82f174dbf4a 
https://www.antiracisminstitute.com/group/the-first-year/discussion/39863539-c21d-41f0-970e-378016080666 
https://fms.microsoftcrmportals.com/forums/general-discussion/cc4b9676-cb0b-ef11-a73c-6045bd20e9c7 
https://thecontingent.microsoftcrmportals.com/forums/general-discussion/43bd9cd4-cc0b-ef11-a73d-6045bd01c1cc
NDMIT - BEST DIGITAL MARKETING INSTITUTE IN VARANASI
Published: 2024-05-08 16:38:47

"National Digital Marketing Institute & Training a.k.a. NDMIT in Varanasi is one of the best digital marketing course providers in Varanasi dedicated to nurturing future digital marketing leaders. 
Our industry-relevant curriculum by highly experienced digital marketing experts & mentors from the country empowers our students to master the latest trends in digital marketing and other related areas. 
Our hybrid & flexible training support system is equally adjustable for all be you’re a fresher, a working professional, or an entrepreneur. Additionally, our curriculum provides assistance to achieve your individual career goals as per your needs. You will find the flexibility to choose the digital marketing course and learning cycle that best suits your specific individual career goals and needs.
Why to Choose NDMIT?
Here are the top reasons to choose NDMIT as your preferred [digital marketing training institute in Varanasi:](https://ndmit.com/digital-marketing-course-in-varanasi/****)
•        Industry-relevant Curriculum
•        Goal-Oriented Hybrid & Flexible Training
•        100% Placement Assistance
•        Practical Exposure
•        Guest Lectures by Top MNCs
•        State-of-the-art Campus
•        Lifelong Support
Embark on a transformative journey into the world of digital marketing and information technology with NDMIT Varanasi, your gateway to unparalleled education


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pclom5sfxne3y37vxsi5.jpeg)
The Power of Vite: A Visual Guide to the Modern Frontend Toolchain
Tags: vite, react, webdev, coding
Published: 2024-05-08 16:13:42

In the world of frontend development, having a well-optimized toolchain is crucial for a smooth and efficient workflow. One tool that has been gaining immense popularity among developers is Vite. But why is everyone using Vite? Let’s dive into this modern frontend toolchain and explore its features that make it the go-to choice for many.

Vite is a fast and lean build tool designed specifically for modern web projects. It takes advantage of native ES modules, which allows for faster development and build times. By leveraging the power of ES modules, Vite enables dynamically importing dependencies at runtime, eliminating the need for bundling during development.

But Vite is not just about speed. It also offers a range of features that enhance the developer experience. One of the most notable features is hot module replacement (HMR). With HMR, developers can see instant updates in the browser as they modify their code. This eliminates the need for a manual refresh and greatly speeds up the development process.

Another key aspect of Vite is its capability to optimize static assets for production. Vite leverages tools like esbuild, TSC, and Rollup to optimize the final build, resulting in smaller and more efficient production bundles. This not only improves the loading speed of web applications but also reduces the overall bundle size.

In addition to these features, Vite also supports source maps, which are invaluable for debugging and understanding code in the browser’s developer tools. With source maps, developers can easily trace back the original code and identify any issues or bugs.


Overall, Vite offers a powerful and efficient toolchain for frontend development. Its use of native ES modules, hot module replacement, and optimized production builds make it a valuable asset for developers. So, it’s no wonder why everyone is using Vite. If you haven’t tried it yet, give it a go and experience the modern frontend toolchain firsthand!

I hope you liked the article! ❤️

Connect with me: [LinkedIn](https://www.linkedin.com/in/safdarali25/).

Explore my [YouTube ](https://www.youtube.com/@safdarali_)Channel! If you find it useful.

Please give my [GitHub ](https://github.com/Safdar-Ali-India)Projects a star ⭐️

Happy Coding! 🚀
Thanks for 22098! 🤗
Increment/Decrement in solidity smart contract
Tags: solidity, smartcontract, ethereum, pragma
Published: 2024-05-08 16:11:27

Here is a simple contract that you can get, increment and decrement the count store in this contract.

```
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

contract Counter {
     uint256 public count;
 
     // Function to get the current count
     function get() public view returns (uint256) {
          return count;
     }

     // Function to increment count by 1
     function inc() public {
          count += 1;
     }

     // Function to decrement count by 1
     function dec() public {
          // This function will fail if count = 0
          count -= 1;
     }
}
```
PandApache3, the Apache killer
Tags: webdev, web, csharp
Published: 2024-05-08 16:10:41

If you visit a website today, there is a strong chance that the web service responsible for delivering web pages is Apache.

Apache is THE reference as a web server. Of course, competitors exist, such as IIS, Nginx, or the dreadful Tomcat.

But it is evident that Apache is the absolute master of the web.

Yet, this domination comes with a heavy toll. The version of Apache you are likely running today is (normally) the second of its name: Apache2.

And you probably have version 2.4.x installed.

---

Apache is almost 30 years old.

And does nothing shock you?

---

30 years old and in version 2.4? Who are we kidding? For comparison, Firefox, launched 10 years later, is already at version 125!!!

It's time to bid farewell to the Web of yesterday and welcome the Web of tomorrow. The future is now!

---

## PandApache3

Discover PandApache3! PandApache3 is a lightweight web server specifically designed to host websites.

Written in a modern language, C# (and not in horrible C), PandApache3 is already in version 3. Exactly version 3.2.0. While this web service isn't even 1 year old, it already has 0.8 versions ahead of Apache legacy. REALIZE THIS!

PandApache3 is a modern web service, designed to be easy to configure (the configuration file is optional) and exploit. With PandApache3, you can:

    

- Host static resources such as HTML, CSS, Java/JavaScript files, or one of the many supported MIME types!
- In addition to serving resources, you can also receive them with document loading support.

---

## Advanced Security

Have peace of mind with PandApache3 thanks to advanced security features such as:

- Basic authentication
- Directives to separate your source folders or limit the use of HTTP verbs.

---

## In Development, Growing Strong

The advantage of the future is that we can dream. Come dream with us with the following roadmap:

- HTTPS support
- Driving your service through an API
- Metrics exposure through an API
- Easily transitioning your web service to PaaS mode
- Protection against quantum DDoS attacks.

The future is limitless with PandApache3.

---

## Why Switch from Apache2 to PandApache3?

Scientists are clear. 3 is superior to 2, even with bizarre languages like JavaScript.

Step up your game, switch to PandApache3.

---

[PandApache3 release](https://github.com/MarieLePanda/PandApache3/releases)
How to run a local Phoenix app on another machine
Tags: phoenix, elixir
Published: 2024-05-08 16:09:55

When you create a new Phoenix app, it uses the `127.0.0.1` IP address by default. To run it locally on another machine (e.g. your phone), you need to change this on `config/dev.exs`.

Find the `http` config on that file. You’ll see something like this:

```elixir
http: [ip: {127, 0, 0, 1}, port: 4000]
```

Now, change it to:

```elixir
http: [ip: {0, 0, 0, 0}, port: 4000]
```

That’s it! Now you’ll be able to test your Phoenix app locally on other machines by using your network’s IP address.
PandApache3, le tueur d'Apache
Tags: webdev, web, csharp
Published: 2024-05-08 16:06:03

Si vous vous rendez sur un site web aujourd’hui, il y a de fortes chances que le service web qui permette d'envoyer des pages web soit Apache.

Apache est LA référence en tant que serveur web. Bien sûr, des concurrents existent, tels que IIS, Nginx ou l'horrible Tomcat.

Mais il est évident qu’Apache est le maître absolu du web.

Pourtant, cette domination vient avec un lourd tribut. La version d’Apache que vous faites fonctionner aujourd’hui est (normalement) la deuxième du nom : Apache2.

Et vous avez probablement la version 2.4.x installée.

---

Apache a presque 30 ans.

Et rien ne vous choque?

---

30 ans et en version 2.4 ? De qui se moque-t-on ? Pour comparaison, Firefox, lancé 10 ans plus tard, est déjà à la version 125 !!!

Il est temps de dire au revoir au Web d’hier, et de dire bienvenue au Web de demain. Le futur est maintenant !

---

## PandApache3

Découvrez PandApache3 ! PandApache3 est un serveur web léger conçu spécifiquement pour héberger des sites web.

Écrit dans un langage moderne, le C# (et pas en horrible C), PandApache3 est déjà en version 3. En version 3.2.0 exactement. Alors que ce service web n'a même pas 1 an, il a déjà 0.8 version d’avance sur Apache legacy. RENDEZ-VOUS COMPTE !

PandApache3 est un service web moderne, conçu pour être simple à configurer (le fichier de configuration est en option) et à exploiter. Avec PandApache3, vous pouvez :

- Héberger des ressources statiques comme des fichiers HTML, CSS, Java/JavaScript ou l'un des nombreux types MIME supportés !
- En plus de servir des ressources, vous pouvez aussi en recevoir avec le support de chargement de document.

---

## La sécurité avancée

Ayez l’esprit tranquille avec PandApache3 grâce à des fonctionnalités de sécurité avancées telles que :
- L'authentification basique
- Des directives pour séparer vos dossiers source ou limiter l’usage de verbes HTTP.

---

## En développement, en pleine croissance

L’avantage du futur est que l’on peut rêver. Venez rêver avec nous avec la roadmap suivante :
- Le support du HTTPS
- Le pilotage de votre service par API
- L’exposition de métriques par API
- La possibilité de passer votre service web en mode PaaS facilement
- La protection contre le DDoS quantique.

Le futur est sans limite avec PandApache3.

---

## Pourquoi passer de Apache2 à PandApache3 ?

Les scientifiques sont formels. 3 est supérieur à 2, même avec des langages bizarres comme JavaScript.

Passez à la vitesse supérieure, passez à PandApache3.

---
[PandApache3 release](https://github.com/MarieLePanda/PandApache3/releases)
Solidity "Hello World"
Tags: solidity, pragma, smartcontract, ethereum
Published: 2024-05-08 16:05:52

pragma specifies the compiler version of Solidity.

```
// SPDX-License-Identifier: MIT
// compiler version must be greater than or equal to 0.8.24 and less than 0.9.0
pragma solidity ^0.8.24;

contract HelloWorld {
     string public greet = "Hello World!";
}
```
How to create a Timer using JScript?
Tags: javascript, programming
Published: 2024-05-08 15:43:28

So I'm working on a project that I named : [comprar códigos iptv españa](https://iptvmovistar.es/comprar-codigos-iptv-espana/) and I want to add a timer to the page (like the one you see in Hostinger home page), does anyone know how to do it?
thanks in advance
Dynamic formula evaluation in Apex
Tags: salesforce, apex, formula, forcetrails
Published: 2024-05-08 15:32:19

Problems solved by dynamic formula evaluation
- Create a formula field on the fly in the apex code.
- Create a formula for the Wrapper class object in apex.
- Calculate formula values at run time in apex.
[Evaluating Dynamic Formulas in Apex
](https://www.forcetrails.com/2024/05/evaluating-dynamic-formulas-in-apex.html)