teleren/devto huggingface dataset:
ScoutSuite
Tags: 100daystooffload, tooling, security, cloud
Published: 2024-06-06 18:35:11

[ScoutSuite](https://github.com/nccgroup/ScoutSuite) is a really nice security tool to audit your cloud solutions.

I have used it on the AWS cloud and it instantly gave me some things to inspect further and it was easy to get started with. However the tool also support other cloud providers as Azure, GCP and more.

The project is based on Python and can be installed like this.

```terminal
virtualenv -p python3 venv
source venv/bin/activate

pip install scoutsuite
```

I recommend to use the [custom policy](https://github.com/nccgroup/ScoutSuite/blob/develop/doc/aws-minimal-permission-policy.json) provided by their wiki page when running against AWS. With that you will give the tool minimal privileges.

Set up a new profile in the aws credential file that is using the policy above when [authenticating](https://github.com/nccgroup/ScoutSuite/wiki/Amazon-Web-Services#authentication) against AWS, call the profile, `scoutprofile`.

```text
[default]
aws_access_key_id = AKIA...
aws_secret_access_key = thesecretkey

[scoutprofile]
aws_access_key_id = AKIA...
aws_secret_access_key = anothersecretkey
```

Now we can use the command below to start the application.

```terminal
$ python scout.py aws --profile scoutprofile
```

This will start to query the AWS API to find out as much as possible about your AWS environment. When done, it will create a nice web page with a report on all the findings.

I really recommend you to try it out, I had valuable feedback on my first try and the investment to get it running was quite low.

There are of course many tools out there to try out, if you want to explore more, then this [curated list](https://github.com/4ndersonLin/awesome-cloud-security) is a great resource.

Happy auditing!
Geração de IDs únicos no Salesforce sem chance de colisão
Published: 2024-06-06 18:31:50

Para garantir a geração de IDs únicos no Salesforce sem chance de colisão, é possível utilizar algumas abordagens eficazes. A seguir, descrevo algumas dessas abordagens:

### 1. **Utilizar a API padrão de Salesforce (UUID)**

Salesforce possui uma função nativa para gerar UUIDs (Identificadores Únicos Universais) no Apex, o que praticamente elimina as chances de colisão. O UUID é um padrão internacional para criar identificadores únicos.

```apex
String uniqueId = String.valueOf(Math.abs(Crypto.getRandomLong()));
```

### 2. **Combinar campos exclusivos**

Você pode criar um ID único combinando vários campos que, juntos, são garantidos como únicos. Por exemplo, concatenar o ID do registro com a data e hora atual, um código único de usuário, ou outros campos exclusivos.

```apex
String uniqueId = 'ID-' + System.currentTimeMillis() + '-' + UserInfo.getUserId();
```

### 3. **Usar Sequências Automáticas**

Criar um campo do tipo "Auto Number" que incrementa automaticamente para cada novo registro. Isso garante unicidade por definição.

- **Exemplo de uso:**
  - Configure um campo "Auto Number" no objeto desejado.
  - No campo "Display Format", defina o formato como "UNQ-{000000}" para que os números sejam gerados como `UNQ-000001`, `UNQ-000002`, etc.

### 4. **Combinar Data e Hora com um Incremento**

Combinar a data e hora atual com um incremento para assegurar unicidade.

```apex
Datetime dt = Datetime.now();
String uniqueId = dt.format('yyyyMMddHHmmssSSS') + '-' + UserInfo.getUserId();
```

### 5. **Uso de Chaves Externas**

Se você está integrando com outro sistema, pode utilizar chaves externas que garantem a unicidade no sistema original. Isso pode ser útil, por exemplo, em integrações com ERP, CRM, ou outros sistemas que já garantem a unicidade das chaves.

### Exemplo Completo em Apex:

Aqui está um exemplo completo utilizando várias técnicas para garantir a unicidade:

```apex
public with sharing class UniqueIdGenerator {

    public static String generateUniqueId() {
        // Utilize a função de geração de UUID
        String uuid = String.valueOf(Math.abs(Crypto.getRandomLong()));

        // Combine com a data e hora atual para mais segurança
        Datetime dt = Datetime.now();
        String timestamp = dt.format('yyyyMMddHHmmssSSS');

        // Combine com o ID do usuário para garantir mais unicidade
        String userId = UserInfo.getUserId();

        // Crie o ID único final
        String uniqueId = uuid + '-' + timestamp + '-' + userId;

        return uniqueId;
    }
}
```

Este exemplo utiliza um UUID, a data e hora atual e o ID do usuário para criar um ID único. A combinação desses elementos reduz drasticamente a chance de colisão.

Escolher a abordagem correta depende das suas necessidades específicas e do contexto de uso no Salesforce. Essas técnicas combinadas garantem que você terá um ID único para cada registro sem a preocupação de colisões.
AI CSS Animations
Tags: webdev, css, design, ai
Published: 2024-06-06 18:21:38

I released my first software in the design space about a month ago, a free AI CSS animation generator.

As a dev/designer, I was frustrated with the annoying & tedious process of writing keyframe animations. The lack of good tools available led me to build my own solution.

After a month of intense development, it’s ready! Now, I'm reaching out to the Dev community for feedback and beta testers to help refine things further :)

If you're interested in making some slick animations for your site, I'd love for you to try it out and share your thoughts! Looking for harsh criticisms here, don’t hold back!

[Aicssanimations.com](https://Aicssanimations.com)
Node.js Performance Optimization: Unleashing the Full Potential of Your Applications
Tags: node, performanceoptimization, eventloop, tutorial
Published: 2024-06-06 17:59:50

**Introduction:** Node.js has revolutionized the world of server-side development with its non-blocking, event-driven architecture. However, achieving optimal performance in Node.js applications requires more than just writing efficient code — it requires a deep understanding of its underlying principles and techniques for optimization. In this article, I’ll share insights and strategies for maximizing the performance of your Node.js applications, helping you unlock their full potential.

## Main Points:

1.  **Understanding Event Loop:** Explain the event loop in Node.js and its role in handling I/O operations asynchronously, emphasizing its impact on application performance.
2.  **Identifying Performance Bottlenecks:** Discuss common performance bottlenecks in Node.js applications, such as CPU-bound and I/O-bound operations, and how to identify them using profiling tools.
3.  **Code Optimization Techniques:** Offer tips and best practices for optimizing Node.js code, including minimizing blocking operations, caching frequently accessed data, and using asynchronous patterns effectively.
4.  **Scaling Strategies:** Explore strategies for horizontally and vertically scaling Node.js applications to handle increased traffic and workload, including load balancing, clustering, and vertical scaling techniques.
5.  **Memory Management:** Discuss memory management in Node.js, including techniques for reducing memory consumption, detecting memory leaks, and optimizing garbage collection.
6.  **Performance Monitoring and Tuning:** Introduce tools and techniques for monitoring the performance of Node.js applications in real-time, identifying performance issues, and fine-tuning system parameters for optimal performance.
7.  **Security Considerations:** Address the importance of security in performance optimization, including best practices for securing Node.js applications against common vulnerabilities and attacks.

**Conclusion:** By implementing the strategies and techniques discussed in this article, you can optimize the performance of your Node.js applications and deliver faster, more responsive experiences to your users. With a solid understanding of Node.js performance optimization, you can unleash the full potential of your applications and stay ahead in today’s competitive landscape.

**Call to Action:** Ready to take your Node.js applications to the next level? Start by incorporating the performance optimization strategies discussed in this article into your development workflow, and join the conversation on LinkedIn to share your experiences and learn from others. Together, we can build faster, more scalable Node.js applications and drive innovation in the world of software development.
Disable the right-click context menu in JavaScript?
Tags: webdev, javascript, programming, tutorial
Published: 2024-06-06 17:30:31

The context menu, accessible by right-clicking on a webpage element, is a handy tool for users. It offers quick actions like copying text, saving images, or inspecting the page code. But have you ever wondered if it's possible to disable this menu?

Yeah, we can disable the context menu! Let's see how we can implement that on our webpages.

## Disable for Whole Page

```JavaScript
window.addEventListener("contextmenu", e => e.preventDefault());
```

## Disable using oncontextmenu

```HTML
<body oncontextmenu="return false;">
   <div>
       Page Content
   </div>
</body>
```

## Disable for specific element without

```JavaScript
const disableClick = document.getElementId("component");

disableClick.addEventListener("contextmenu", e => e.preventDefault());
```

## Limitations and Considerations

- **Ineffective Protection:** Disabling the context menu doesn't truly safeguard your content. Savvy users can still access the source code or copy images using browser developer tools or extensions.

- **User Workarounds:** Tech-savvy users can bypass these methods, rendering them ineffective.

- **Browser Safeguards:** Modern browsers often have built-in features that prevent websites from completely disabling the context menu.
Startup vs. Corporates: Which Path Will Make You a Millionaire?
Tags: career, productivity, startup, programming
Published: 2024-06-06 17:15:58

What's the probability of working at a startup and becoming a millionaire? 🤔 

The harsh reality is that most startups fail, and even successful ones rarely lead to life-changing wealth for employees. Do you prefer the stability of a big company or the high-risk, high-reward gamble of startup life? 

👉 **Read more** in my latest article exploring [the startup vs. big company trade-off](https://iwooky.substack.com/p/startup-vs-corporates)

[![Startup vs. Corporates: Which Path Will Make You a Millionaire?](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/44vc1uwbrrl4b414lr2l.jpg)](https://iwooky.substack.com/p/startup-vs-corporates)
Optez pour le Meilleur Abonnement IPTV en France : Plus de 12 000 Chaînes en SD, HD, Full HD et 4K
Published: 2024-06-06 17:03:36

**Découvrez l'Expérience Ultime avec Notre Abonnement IPTV**
Vous cherchez le meilleur abonnement IPTV en France ? Ne cherchez plus ! Notre service IPTV vous offre une sélection impressionnante de plus de 12 000 chaînes en qualité SD, HD, Full HD et même 4K. Que vous soyez fan de films, de séries, de sport ou de documentaires, notre abonnement IPTV inclut une variété de genres pour répondre à tous vos besoins.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/84ood627b5vfe9uculx6.PNG)
Une VOD Riche et Diversifiée
En plus de nos chaînes en direct, notre abonnement IPTV comprend une vaste bibliothèque de vidéos à la demande (VOD). Profitez d'un large choix de films récents, de classiques intemporels, de séries populaires et de documentaires captivants. Notre service VOD est conçu pour vous offrir une expérience de divertissement inégalée, accessible à tout moment.

Pourquoi Choisir Notre Service [iptv en ligne](https://www.supremiptv.com/) ?
Qualité Supérieure : Regardez vos programmes préférés en SD, HD, Full HD et 4K, pour une expérience visuelle exceptionnelle.
Diversité des Chaînes : Plus de 12 000 chaînes couvrant tous les genres, pour satisfaire tous les goûts.
VOD Impressionnante : Une collection riche et variée de films, séries et documentaires.
Service Client Dédié : Une équipe à votre écoute pour vous offrir le meilleur service possible.
Facilité d'Abonnement : Inscrivez-vous en quelques clics et commencez à profiter immédiatement de votre abonnement IPTV.
Abonnez-vous dès Maintenant avec le Meilleur Service IPTV
Ne manquez pas l'occasion de vivre une expérience IPTV exceptionnelle en France. Avec notre abonnement IPTV, vous bénéficiez non seulement d'un accès à un vaste éventail de chaînes et de contenus VOD, mais aussi d'un service fiable et de haute qualité.

Rejoignez notre communauté de clients satisfaits et découvrez pourquoi nous sommes le choix numéro un pour l'IPTV en France. Abonnez-vous dès maintenant et transformez votre manière de regarder la télévision !

Pour plus d'informations et pour souscrire, visitez notre site web et laissez-vous guider. Votre expérience de divertissement ultime n'est qu'à quelques clics !
Tune In to "Talking Tech with Techielass" – Your Weekly Azure Update in Under 5 Minutes!
Tags: azure
Published: 2024-06-06 17:00:00

![Tune In to "Talking Tech with Techielass" – Your Weekly Azure Update in Under 5 Minutes!](https://www.techielass.com/content/images/2024/06/Tune-In-to-Talking-Tech-with-Techielass---Your-Weekly-Azure-Update-in-Under-5-Minutes-.png)

Want to stay on top of the latest Azure news without spending too much time? **_Talking Tech with Techielass_** is your go-to podcast! Each week, I deliver the newest updates from Azure in a short, under 5-minute episode.

Whether you're commuting, working, or simply need a quick tech update, my podcast ensures you're always in the know about Azure’s dynamic world. No unnecessary details—just straight information to keep you informed and efficient.

Catch **_Talking Tech with Techielass_** on your preferred podcast platform:

- [**Amazon Music**](https://music.amazon.co.uk/podcasts/39b95751-3f87-4593-a3a4-3c51654cd1ed/tech-talk-with-techielass?ref=techielass.com)
- [**Spotify**](https://open.spotify.com/show/34QAAvMLSYN09eOAu3j2b0?ref=techielass.com)
- [**Apple Podcasts**](https://podcasts.apple.com/us/podcast/sarah-leans-weekly-update-podcast/id1506712194?uo=4&ref=techielass.com)
- [**YouTube**](https://www.youtube.com/playlist?list=PLbjernQTVXitqaDOIVD_e5qjmSWErpRA1&ref=techielass.com)
- [**Overcast**](https://overcast.fm/itunes1506712194/sarah-leans-weekly-update-podcast?ref=techielass.com)
- [**Castbox**](https://castbox.fm/channel/id2752244?ref=techielass.com)

Prefer an [RSS feed](https://anchor.fm/s/1b36d81c/podcast/rss?ref=techielass.com)? We've got that too!

Subscribe now and never miss an episode. Stay informed, stay ahead, and let’s dive into tech!

[**Listen Now and Subscribe!**](https://podfollow.com/talking-tech-with-techielass?ref=techielass.com)
846. Hand of Straights
Tags: php, leetcode, algorithms, programming
Published: 2024-06-06 16:56:44

846\. Hand of Straights

Medium

Alice has some number of cards and she wants to rearrange the cards into groups so that each group is of size groupSize, and consists of `groupSize` consecutive cards.

Given an integer array `hand` where `hand[i]` is the value written on the <code>i<sup>th</sup></code> card and an integer `groupSize`, return `true` if she can rearrange the cards, or `false` otherwise.

**Example 1:**

- **Input:** hand = [1,2,3,6,2,3,4,7,8], groupSize = 3
- **Output:** true
- **Explanation:** Alice's hand can be rearranged as [1,2,3],[2,3,4],[6,7,8] 

**Example 2:**

- **Input:** hand = [1,2,3,4,5], groupSize = 4
- **Output:** false
- **Explanation:** Alice's hand can not be rearranged into groups of 4.

**Example 3:**

- **Input:** hand = [2,1], groupSize = 2
- **Output:** true
- **Explanation:** Alice's hand can not be rearranged into groups of 2.

**Constraints:**

- <code>1 <= hand.length <= 10<sup>4</sup></code>
- <code>0 <= hand[i] <= 10<sup>9</sup></code>
- <code>1 <= groupSize <= hand.length</code>

**Note:** This question is the same as 1296: https://leetcode.com/problems/divide-array-in-sets-of-k-consecutive-numbers/

**Solution:**

```
class Solution {

    /**
     * @param Integer[] $hand
     * @param Integer $groupSize
     * @return Boolean
     */
    function isNStraightHand($hand, $groupSize) {
        $cardCounts = array();
        foreach ($hand as $card) {
            if (!isset($cardCounts[$card])) {
                $cardCounts[$card] = 1;
            } else {
                $cardCounts[$card]++;
            }
        }
        sort($hand);
        foreach ($hand as $card) {
            if (isset($cardCounts[$card])) {
                for ($nextCard = $card; $nextCard < $card + $groupSize; $nextCard++) {
                    if (!isset($cardCounts[$nextCard])) {
                        return false;
                    }
                    if (--$cardCounts[$nextCard] == 0) {
                        unset($cardCounts[$nextCard]);
                    }
                }
            }
        }
        return true;
    }
}
```

**Contact Links**

- **[LinkedIn](https://www.linkedin.com/in/arifulhaque/)**
- **[GitHub](https://github.com/mah-shamim)**
Great Style
Published: 2024-06-06 16:42:40

Great Style Barbershop NYC is the place to go for anyone on the Upper East Side looking for a top-notch haircut. The barbers here are true professionals, always taking their time to ensure you leave looking sharp. The shop itself is modern, clean, and has a really comfortable vibe. If you’re in need of a reliable [barbershop upper east side](https://greatstylebarbershopnyc.com/), this is definitely where you want to be.
Chic Templates for Fashion Presentations
Published: 2024-06-06 16:38:04


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/abhyo8xo4sl5bq8i2pm7.png)
In the world of fashion, presentation is everything. Whether you’re showcasing a new collection, pitching a design concept, or creating a mood board, the way you present your ideas can make or break their impact. This is where fashion presentation templates come into play. These templates provide a framework for presenting your ideas in a visually appealing and coherent manner, but their effectiveness hinges on the understandability of the content they contain.

The Significance of Clarity in [Fashion Presentation Templates](https://simplified.com/ai-presentation-maker/fashion)
Fashion presentation templates serve as a canvas for expressing creativity and vision. However, if the content within these templates is not easily understandable, the purpose and impact of the presentation can be lost. Readers who can’t understand your content well won’t keep reading for long. If the articles in your blog are boring or confusing, they won’t attract people to your website or encourage potential customers to try your business

To ensure that your fashion presentation templates effectively convey your message, it’s crucial to make the content easily comprehensible. This involves using clear, direct sentences that are easy to follow and understand. Aim for clear, direct sentences that run 15 words or fewer. Finally, look at the Characters per Word. Petite words average only 4.5 characters in length, well under the suggested 5.0 limit. Don’t use a longer word when a shorter word will do. You don’t get extra points for using pulchritudinous instead of pretty

Enhancing Understandability in Fashion Presentations
To optimize the understandability of fashion presentation templates, it’s essential to consider various factors. Transition words play a crucial role in connecting ideas and ensuring a coherent flow of information. These transitions help readers follow the flow of ideas and understand the relationships between different elements within the presentation

Moreover, the use of visual aids, such as statistical tables, images, and short videos, can significantly enhance the understandability of fashion presentations. These additives will make your webpage break into chunks and hence easy to be read. The best thing about a website is that it is an easy way to direct readers to more information. The additional info helps the reader to find more about what he is already reading. So, supplement your webpage with hyperlinks and other external sources. This will not only rank your website but also will benefit from engaging the reader more

In conclusion, the understandability of content within fashion presentation templates is paramount for effectively conveying ideas and concepts within the fashion industry. By prioritizing clarity, coherence, and the strategic use of visual and textual elements, fashion presentations can truly shine and make a lasting impact.
SwiftUI and Navigation
Tags: discuss, swiftui, swift, ios
Published: 2024-06-06 16:36:39

I’m currently developing a multiplatform app and am having issues with both the tab control and sidebar on the iPhone and iPad devices. Ideally I want the user to be able to switch between the two if they prefer one over the other... and the switching currently works great but I've noticed minor issues with both formats. 

Specifically my app can go up to four levels but in this sample I have three. The left sidebar or tabs has four choices, the middle has it's own choices, and the right has a text box showing what was clicked on. With the sidebar option I notice the right screen doesn't change when you click on the sidebar (though the center does). Also the sidebar clicks print out text (with the onChange modifier) but don't register in the view. 
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2nrdkuynctfs7l6c5alv.png)

I was going to lock it down to just tab control for now so the app is easily useable but noticed if you click to the third level then switch tabs the back button on the phone changes (from saying back) to reflect the newly selected tab but the content shows the old view. 

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

Using tab control on the iPad the middle sidebar (now on the left side)updates when the tab is changed but again, like with the phone, the right pane shows the old content. 

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

Just curious if anyone knows of a good multiplatform SwiftUI tutorial that would help me get this working. In my actual app the right view sometimes has two levels with a back button.

Either way hope your day is going good!