teleren/devto huggingface dataset:
Métodos de segurança em API
Tags: braziliandevs, beginners, devops, security
Published: 2022-12-14 19:24:14

Existem várias maneiras de tornar uma requisição à API mais segura. Algumas dicas incluem:

1) Utilizar HTTPS em vez de HTTP para criptografar a comunicação entre o cliente e o servidor.

2) Implementar autenticação de usuário para garantir que apenas usuários autorizados tenham acesso à API. Isso pode ser feito por meio de tokens de acesso ou credenciais de usuário.

3) Implementar autorização de recursos para garantir que os usuários tenham apenas o acesso aos recursos que lhes são permitidos. Isso pode ser feito por meio de regras de autorização ou papéis de usuário.

4) Utilizar assinaturas digitais para verificar a integridade das solicitações à API. Isso ajuda a garantir que as solicitações não tenham sido alteradas ou falsificadas durante o transporte.

5) Monitorar e registrar o acesso à API para detectar e investigar quaisquer tentativas de acesso não autorizado ou comportamento suspeito. Isso pode ajudar a identificar vulnerabilidades na segurança da API e tomar medidas para corrigi-las.

Uma maneira de deixar uma requisição na API mais segura é usar autenticação de token. Isso significa que, ao invés de enviar suas credenciais de acesso (como nome de usuário e senha) em cada requisição, você pode enviar um token único que é gerado usando suas credenciais. Esse token é enviado em cada requisição, e a API verifica se o token é válido antes de processar a requisição.

Outra maneira de tornar as requisições mais seguras é usar criptografia em todas as comunicações com a API. Isso garante que as informações enviadas e recebidas estejam seguras e protegidas contra acesso não autorizado. É importante lembrar de usar sempre protocolos de segurança de rede atualizados e confiáveis.

Além disso, é sempre recomendado implementar medidas de segurança adicionais, como limites de tentativas de login e verificação de captchas, para proteger contra ataques de força bruta. Também é importante manter todos os sistemas e bibliotecas utilizados atualizados com as últimas correções de segurança.
Don't use '&&' for conditional reasoning
Tags: webdev, javascript, programming, react
Published: 2022-12-14 18:56:06

We often use '&&' to display a component if a given condition is true and to not display it when the condition is false.  

```javascript
function BigComponent({condition}) {
    return (
        <div>
          <p> After this we will try to render a component based 
             on a condition 
          </p>
          {condition && <NextComponent/>}
        </div>
    )
}

export default BigComponent
```

So basically, here the condition is evaluated and only if the left side of '&&' is true, we move forward and then render the second half, that is the component.

This is called short circuiting.

## There are two problems here:
1. The output to the condition must be **boolean**. If the condition gives 0, it will render 0.

2. If the result from the condition is undefined, it will give an **error**.

## What to do then?

To avoid something like displaying a zero or getting an 🔴error🔴, we can use a **ternary operator**:

` condition ? <ConditionalComponent /> : null `

which translates to: "if _condition_ is true do the first statement else execute the statement after the colon (:)"

### Happy Coding!👩‍💻
Agile as a fake exhaust
Published: 2022-12-14 19:00:45

---
title: Agile as a fake exhaust
published: true
date: 2022-12-14 18:53:57 UTC
tags: 
canonical_url: https://blog.daliborbelic.com/agile-as-a-fake-exhaust
---

The IT industry, you will agree, is quite famous for its buzzwords, and most definitely, agile is one of many.

More often than not, these buzzwords are, in a nutshell- fake exhausts (an analogy from the auto industry). The real exhausts are somewhere underneath, hidden. And in the case of Agile, what is hidden is Waterfall.

All great product teams focus on solving problems, not building features- outcome vs output.

However, if the solving problem looks like this: a PM defines requirements and then gives them to a designer who creates workflows, who then gives them to engineers- well, you are practising Waterfall. The longer you wait to introduce a product idea to engineers, the greater the chance of failure.

Instead, we should prompt cross-functional collaboration (PM/PO + Engineers + Designers) sooner.

Solving problems within given constraints is what engineering is all about. Therefore, leave feature roadmaps aside for a bit and hear your engineers. Your engineers are the single best source of innovation!

Finally, one more analogy I like- there are two types of engineering teams, the team of mercenaries and the team of missionaries. 10/10 times Id choose to be a part of the latter.

What comes next is enhancing engineering teams with tools like CI/CD, TDD, and other mechanisms that create better software faster. Those will be the topics for my future rants.
Introdução a ferramenta Netcat
Tags: braziliandevs, security
Published: 2022-12-14 18:53:15

O netcat é uma ferramenta que pode ser usada para realizar diversas tarefas relacionadas a rede, como criar conexões de rede, transferir arquivos e executar port scanning. Para usar o netcat, primeiro você precisa instalá-lo em seu sistema. Isso geralmente pode ser feito executando o seguinte comando em um terminal:

```
sudo apt-get install netcat
```

Uma vez instalado, você pode usar o netcat com diversos parâmetros diferentes para realizar diferentes tarefas. Por exemplo, para criar um servidor TCP simples que escuta em uma porta específica, você pode usar o seguinte comando:

```
nc -l 1234
```

Isso fará com que o netcat crie um servidor que escuta na porta 1234. Para se conectar a esse servidor como um cliente, você pode usar o seguinte comando:

```
nc localhost 1234
```

Isso fará com que o netcat se conecte ao servidor local na porta 1234. Você pode então enviar e receber dados através da conexão de rede criada.

Existem diversos comandos básicos que você pode usar com o netcat. 
Alguns exemplos incluem:

**nc -l 1234:** cria um servidor que escuta na porta 1234

**nc localhost 1234:** se conecta ao servidor local na porta 1234

**nc -z localhost 1234-1240:** realiza um port scanning nos endereços e portas especificados, procurando por portas abertas

**nc -w 3 localhost 1234 < arquivo.txt:** envia o conteúdo do arquivo arquivo.txt para o servidor local na porta 1234

**nc localhost 1234 > arquivo.txt:** recebe dados do servidor local na porta 1234 e salva-os no arquivo arquivo.txt

Esses são apenas alguns exemplos de comandos básicos do netcat.
Smart contracts: audit ‘em all like a security engineer
Tags: blockchain, security, audit, cryptography
Published: 2022-12-14 18:51:40

> Don’t let reentrancy and front-running attacks, signature replay, gas issues, sensitive data leakage, deadlocks, and various kinds of vulnerabilities in smart contracts pfaff you around. 

⚠️ Blockchain systems are often taken as safe and secure by default. But oops they are not until someone takes proper care of their security. 🤌 Do you know that **smart contracts, which are code stored on a blockchain, can be abused and misused just like other software**? 

In our new engineering blog post 👉 [Smart contract security audit: tips & tricks](https://www.cossacklabs.com/blog/smart-contract-security-audit-tips-tricks/) 👈, we’ve gathered tips & tricks that will help you eliminate risks and threats and happily survive in this wild wild west. 

🎯 The first step is a security audit. 

💡 **Security audit of smart contracts differs from auditing "traditional software".** We’ve spent years building, auditing, and improving security / cryptography within cryptocurrency fundamental protocols, nodes, wallets (must check 👉 [Crypto wallets security as seen by security engineers](https://www.cossacklabs.com/blog/crypto-wallets-security/) 👈), and bridges, so we have lots to tell about it ;)

To cover what you need to **secure the smart contract’s code, infrastructure, and data flow**, we’ve focused on the Tezos network and 👉 [freshly-baked audit of the Tezos Project in Allbridge Classic](https://www.cossacklabs.com/case-studies/smart-contract-security-audit-for-allbridge-cross-chain-bridge-with-tezos/) 👈.🐬 Dive in!

> Smart contracts have a lot in common with distributed applications but differ in details. They are generally small and easier to review. They have unique threat vectors, like malicious bakers or gas exhaust. They don’t store any private data but they still operate with sensitive information: signatures, administrator addresses, user balances, etc. Check them out!

[![Smart contract security audit: tips & tricks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ch5shapuinm0yz7bqit.png)](https://www.cossacklabs.com/blog/crypto-wallets-security/)
Charity MLOps Webinar "Vertex AI Pipelines infrastructure with Terraform"
Tags: machinelearning, devops, ai, googlecloud
Published: 2022-12-14 18:41:35

[Data Phoenix](https://dataphoenix.info/) team invites you all to our upcoming "The A-Z of Data" charity webinar that’s going to take place on **December 21, 2022 at 16.00 CET**.

**Topic:** “Vertex AI Pipelines infrastructure with Terraform”
**Speaker:** Alona Slastin, ML Engineer at SoftServe
**Participation:** free (but you’ll be required to register)
**Karma perk:** donate to our charity initiative

REGISTER 👉 https://www.eventbrite.com/e/charity-ai-webinar-vertex-ai-pipelines-infrastructure-with-terraform-tickets-481912522327

## ABOUT THE SPEAKER AND TOPIC
**Alona** is an ML Engineer with experience in Data Analysis and Data Science with knowledge of statistics, statistical analysis, advanced analytics and forecasting. Qualified in working with Google Cloud AI services for building continuous ML training pipelines and implementing CI/CD technologies.

> Vertex AI is a Google Cloud Platform service specified on building, deploying and scaling ML models with with pre-trained and customizable models. It provides tools for every step of the machine learning workflow across different model types and for different levels of machine learning expertise.
> Like any cloud platform, it requires the preliminary deployment of an infrastructure, the enabling of specific services and setting up the permissions. You can do it as a code with open-source software tool Terraform, that allows you to safely and predictably create, change, and improve infrastructure.
> During this session we will go through the best practices for developing Vertex AI Pipelines and connect different services together. You will learn how to wrap your infrastructure with Terraform and set up automatic deployment of models using Vertex AI and GCP services.

## ABOUT OUR CHARITY INITIATIVE
This webinar is planned as a charity event. As we did before, we do our best to raise funds for [KOLO](https://www.koloua.com/en) — A project created by Ukrainian IT experts to help Ukraine fight the war against Russia by supplying high-tech equipment to the front lines.

This cause is very special to us. So, please donate any amount you can to help us save Ukrainian lives. Every donation is a huge help!

Donate 👉 https://bit.ly/dataphoenix-koloua

_Please note that participation is free but registration is required! We are also looking forward to any donations that you’re willing to give to our charity initiative._

REGISTER 👉 https://www.eventbrite.com/e/charity-ai-webinar-vertex-ai-pipelines-infrastructure-with-terraform-tickets-481912522327
Python For Beginner Series|Day-15
Tags: python, programming, tutorial, beginners
Published: 2022-12-14 18:39:58

- On Day 15, Today we will do some exercises using List functions.
- Here we are going to do the exercise to select a random name from a list of names. The person selected will have to pay for everybody’s food bill.

https://mynotesoracledba.medium.com/python-for-beginner-series-day-15-35f7b1b63b5
Electronic Engineering and the Development of Emerging Technologies.
Published: 2022-12-14 16:57:19

Electronic engineering plays a crucial role in the development of emerging technologies such as artificial intelligence (AI) and the Internet of Things (IoT). These technologies are transforming the way we live and work, and electronic engineers are at the forefront of making this happen.

**The Role of Electronic Engineers in AI Development**

One of the key challenges in developing AI is creating systems that can process vast amounts of data quickly and accurately. Electronic engineers are involved in designing the hardware that powers these systems, including processors, memory, and other components. They also work on developing algorithms and software to enable AI systems to learn and adapt.

**The Role of Electronic Engineers in the IoT**
The IoT is another area where electronic engineering plays a crucial role. The IoT refers to the growing number of connected devices that are able to collect and exchange data over the internet. Electronic engineers are involved in designing and building the hardware and software that enables these devices to communicate with each other and with other systems. This includes everything from sensors and actuators to networking equipment and cloud-based software.

**Other Emerging Technologies**
In addition to these core areas, electronic engineers are also involved in a wide range of other emerging technologies. For example, they may work on developing new materials and technologies for use in renewable energy systems, or on developing advanced medical devices and diagnostic tools.

**Conclusion**

Overall, electronic engineering is a rapidly evolving field that is at the forefront of many exciting developments in technology. As emerging technologies continue to advance, the role of electronic engineers will only become more important in shaping the future of our world.
Docker For Windows | Setting Up Docker On Windows | Docker Tutorial For Beginners
Tags: docker, window
Published: 2022-12-14 18:32:27

In this video on Docker For Windows we’ll discuss about one of the most popular DevOps tools, i.e. docker. Docker is one of the best containerization platforms out there and in this video, we’re specifically going to discuss about docker for windows.
{% embed https://www.youtube.com/watch?v=iJeL2tOFfvM %}
Meetings Best Practices
Tags: meetings
Published: 2022-12-14 18:31:59

In the previous period, I had a lot of meetings, so I came up with a list of best meeting practices that can help you be better at meetings:

### Before a meeting:
1. Check if you can resolve the issue you have without organizing a meeting. Create a chat group, or email, try to understand the problem better, and try to solve the issue by yourself.
  There are several reasons for this.
   1. The more people you need, the harder it is to find a time that is suitable for everybody.
   2. Meetings are expensive for the company.
   3. People are usually busy with their work.
2. If the subject is urgent, ignore the first point.
3. Prepare the meeting agenda.
4. Check all participants' calendars and choose the best time for a meeting.
5. Schedule a meeting and send the meeting agenda.
6. Prepare yourself for the meeting - do your homework/research.
  You can do this by scheduling another meeting for yourself (book the time).
7. Everybody needs to prepare for the meeting (even if you're not the meeting organizer).

### During the meeting:
1. Don't be distracted by something else (chat messages, phone, other tickets...). Follow the meeting and be active. (This is very hard sometimes :D)
2. If you think that the subject is not relevant to you, then you should check with a meeting organizer why you're called to the meeting. (Mistakes can happen)

#### After the meeting:
1. The meeting organizer needs to send meeting follow-up notes with actions defined in the meeting.
2. The meeting organizer can ask for feedback from some or all the participants.
3. If you think a meeting was not productive, inform the organizer and give him proposals for improvement.

I'm sure that this list is not complete. If you have good meeting practices, please share them with me.

3. If you are needed for some part of the meeting, you can ask the group to leave the meeting after the discussion on your subject is over.
4. The good idea is to write your meeting notes (even if you're not an organizer).
5. At the end of the meeting, you should have a defined list of actions.
Paracetamol.js💊| #194: Explica este código JavaScript
Tags: javascript, spanish, webdev, beginners
Published: 2022-12-14 18:30:00

## **<center>Explica este código JavaScript</center>**
#### <center>**Dificultad:** <mark>Básico</mark></center>

**¿Cuál de los siguientes arreglos es considerado un arreglo disperso?**

```js
const x = [1, 2, 3, [], 4, "5", false, true, 0n];
const y = ["a", "B", "c", {}, "efe", 7, -0, 9];
const z = [1, 2, , 4, 5, , , 100]
```

A. `x`
B. `y`
C. `z`
D. `Ninguna de las anteriores`

Respuesta en el primer comentario.

---

Respuesta:
C. `z`

En JavaScript un arreglo disperso es aquel que tiene items en blanco, dependiendo a como manipulemos estos arreglos dichos items en blanco pueden ser considerados para algunos arrays methods como `undefined` y a veces simplemente como items vacíos.

Por ejemplo:

```js
console.log(z.includes(undefined)) // true
```

Esto regresará `true` ya que dichos items en blanco son rellanados por JavaScript por `undefined`: `[1, 2, undefined, 4, 5, undefined, undefined, 100]`
Top 50 Docker Interview Questions & Answers | Frequently Asked Docker Interview Questions
Tags: docker
Published: 2022-12-14 18:20:17

This Edureka session on ‘Docker Interview Questions’ will discuss the most frequently asked questions that you might face in a Docker interview. This session will focus on pointers like Beginner Interview Questions, Intermediate Interview Questions, Advanced Interview Questions
{% embed https://www.youtube.com/watch?v=ViYjHfbmBYA %}
⚡️ Here are 19 GitHub repositories that’ll make you a better and more efficient developer.
Tags: github, webdev, beginners, tutorial
Published: 2022-12-14 18:18:13

⚡️ Here are 19 GitHub repositories that’ll make you a better and more efficient developer. Look for them in google!

1. how-web-works
2. developer-roadmap
3. web-dev-for-beginners
4. javascript-30
5. developer-handbook
6. spellbook-of-modern-webdev
7. web-fundamentals
8. airbnb
9. clean-code-javascript
10. system-design-primer
11. simpl
12. realworld
13. build-your-own-x
14. coding-interview-university
15. front-end-interview-handbook
16. tech-interview-handbook
17. design-resources-for-developers
18. free-programming-books
19. front-end-collection
Ways to optimize your Lighthouse score
Tags: web, optimize, lighthouse
Published: 2022-12-14 18:08:12

---
title: Ways to optimize your Lighthouse score
published: true
description: 
tags: web, optimize, lighthouse
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2022-12-14 18:06 +0000
---

There are several ways to optimize your Lighthouse score, including the following:

Minimize the size of your page's resources, such as HTML, JavaScript, and CSS files, by minifying them and reducing the number of files that your page loads. This can help improve your page's performance and reduce its loading time.

Enable compression on your web server, which can help reduce the size of the files that your page loads. This can help improve your page's performance and reduce its loading time.

Optimize your images by reducing their size and using the appropriate image file format for the type of image. This can help improve your page's performance and reduce its loading time.
Use a content delivery network (CDN) to serve your page's static assets, such as images and JavaScript files. This can help improve your page's performance by reducing the distance that the assets have to travel to reach the user.

Use caching to store frequently-used resources on the user's device, so that they don't have to be downloaded again on subsequent page visits. This can help improve your page's performance and reduce its loading time.

Use asynchronous loading for your JavaScript and CSS files, so that they don't block the rendering of the page. This can help improve your page's performance and reduce its loading time.

Use a web font service, such as Google Fonts, to serve your page's fonts, rather than hosting them on your own server. This can help improve your page's performance and reduce its loading time.

Use a tool, such as Lighthouse, to audit your page and identify specific areas for improvement. This can help you identify specific steps that you can take to optimize your page and improve your Lighthouse score.
Spring Boot 3 JPA + Auth + JWT
Tags: java, springboot, backend, api
Published: 2022-12-14 17:49:37

## **Description**

After the new release of spring boot 3, it was really hard to find tutorials on JWT Auth with real database user creation and role based authentication on Rest API.

I have created this repo for Spring Boot 3 latest release.
It's a simple implementation of Spring Boot 3 JPA + Auth + JWT with PostgreSQL database.

The app also uses Http-Only Cookies to set and authenticate REST API endpoints.

The app uses Spring Web, Spring Security, Spring JPA, PostgreSQL, jjwt and lombok dependencies.

Lombok is a gem for every spring boot developer.😉
The app uses Graalvm Native Image too.🎉

GitHub Repo: [Spring-Boot-3-Auth-JWT-Cookie-JPA](https://github.com/Ozair0/Spring-Boot-3-Auth-JWT-Cookie-JPA)
Revue Getting Shut down
Tags: discuss, news, twitter, webdev
Published: 2022-12-14 17:33:02

Revue makes it easy for journalists, writers and creators to send a newsletter — and [make money with it](http://help.getrevue.co/en/collections/2637257-paid-newsletters).

It was built for people who publish, whether it’s a one-person operation or a whole organization. We know how much work goes into creating great newsletters, and we can help yours reach a loyal audience and grow indefinitely.

But now it's getting shut down for some reason from January 12, 2023, you won't be able to access your Revue account. All the data will be deleted.

We don't know why it's getting shut down as Revue is a product by [Twitter](https://twitter.com). And since Elon Musk completed his $44 billion takeover of Twitter. I guess **It's all part of his plan.**

You can export all of your data including your subscriber list, past newsletter issues, and analytics by following the instructions [here](http://www.getrevue.co/app/offboard) after logging into your account.

If you are using Revue like me then we have to migrate to some other places. You can share your thoughts on this in the comment section. I'll see you in the next one.