teleren/devto huggingface dataset:
Como criar rotas personalizadas no Magento 2
Tags: php, magento2, braziliandevs, tutorial
Published: 2021-11-19 12:11:28

## Contextualizando

### O que é uma rota?

Uma rota está diretamente relacionada a URL funcionando como um localizador de um recurso, acrescentando um *path* (caminho) na URL, que ao ser chamado, retornará uma página gerada dinamicamente conforme o caminha da URL.

---

## Código para criar uma rota personalizada

O arquivo `routes.xml` contém informações sobre todas as rotas e *frontNames* registrados. O atributo *frontName* é a primeira parte de uma rota da URL.
Deve-se registrar um arquivo `routes.xml` e associá-lo a um módulo. É possível ter vários módulos associados a uma rota.
Para criar uma rota relacionada ao painel administrativo utiliza-se a estrutura de pastas `\{Vendor}\{Module}\etc\adminhtml\routes.xml` e o valor *admin* para o atributo *id* do nó `<router>`, já para criar rotas na parte visual da loja do site utiliza-se a estrutura de pastas `\{Vendor}\{Module}\etc\frontend\routes.xml` e o valor *standard* para o atributo *id* do nó `<router>`.

```xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="{router_id}">
        <route id="{route_id}" frontName="{frontName}">
            <module name="{Vendor}_{Module}" />
        </route>
    </router>
</config>
```

O atributo *id* do nó `<route>` é uma *string* única que identificará a rota. Esta *string* é utilizada para declarar a primeira parte do nome do arquivo de *layout* da página.
O atributo *frontName* é uma *string* única que identificará a primeira parte do caminho da URL.

---

## Finalizando

> Valores entre chaves (`{test}`) devem ser alterados na implementação do código.

### Habilitando as alterações

Execute o comando PHP para limpar todos os caches de armazenamento em cache do processos.

```bash
php bin/magento cache:clean
php bin/magento flush
```

### Diretórios e Arquivos

Segue a a lista de diretórios e arquivos que devem ser criados.

```
- app/
  - code/
    - {Vendor}/
        - {Module}/
          - etc/
            - {area}/
              - routes.xml
            - module.xml
          - registration.php
          - composer.json
```
Olá Mundo!!
Tags: php, database, computerscience, lgpd
Published: 2021-11-19 12:04:27

#Quem sou eu?#

Olá Mundo, me chamo Vinícius, tenho 29 anos, sou um apaixonado por Tecnologia, assim como muito de vocês. Formado em Engenharia de Computação, especialista em Engenharia de Software, me especializando em Ciência de Dados e Big Data Analytics e Computação Forense e Segurança da Informação.

Comecei a estudar programação em 2010, iniciei minha jornada com HTML, PHP, JavaScript e CSS, criava ali umas telinhas mais ou menos, só para brincar mesmo e não eram grandes telas mas já via um resultado, o que me deixava muito apaixonado, curioso e entusiasmado.

Em 2012 dei início ao meu primeiro curso de Desenvolvimento de Sistemas numa escola técnica chamada AF Sistemas, o que me fez evoluir como profissional e começar a ter uma visão do que eu realmente queria.

Em 2013 comecei a fazer faculdade de Engenharia de Computação no Centro Universitário de Anápolis, ou como todos conhecem, UniEvangélica, lá aprendi com os melhores o que me deixava mais apaixonado, finalizando minha graduação em 2020.

Em 2021 finalizei minha primeira Pós-Graduação em Engenharia de Software e já iniciei outras duas novas Pós-Graduações, sendo elas, Ciência de Dados e Big Data Analytics e Computação Forense e Segurança da Informação. Com isso tenho ganhado um grande conhecimento nessas duas áreas que tanto sou apaixonado.

#O que tenho a oferecer?#

Assim como muitos, estou aqui para aprender e ensinar o que eu souber, vou tentar (TENTAR porque a vida é tensa, e as vezes não da tempo de conciliar tudo), trazer conteúdos sobre:

*  PHP, bem como frameworks, focando principalmente no Laravel
*  Banco de Dados
* Seguraça da Informação e LGPD
* Computação Forense (Essa área que tanto sou apixonado)

Vou procurar trazer trabalhos, principalmente, meu TCC Banco de Dados In-Memory, vou melhora-lo e deixa-lo acessível para que vocês possam conhecer e opinar, entre outros trabalhos que vou estar fazendo ou que já fiz ao longo da minha carreira profissional e pessoal. Principalmente apresentar pra vocês formas de Segurança.

No mais, espero contribuir muito para o crescimento de mais membros da comunidade e para o conhecimento geral das pessoas que tenham interesse em acessar meus posts. Não sei quando será o próximo Post, mas prometo que será em breve.


Obrigado a todos que tiraram um tempinho para me conhecer melhor e à todos que vão acessar e ler meus artigos aqui colocados. Um grande abraço e que a força esteja com vocês!!!!
15 In-Demand Cybersecurity Courses
Tags: cybersecurity, python, networking, codered
Published: 2021-11-19 11:44:27

##Subscribe My channel 

[YouTube] (https://youtu.be/PN5tdWupD3I) 
 


1-Practical Cyber Threat Intelligence

 
2-Fundamental of Networking Concepts, Protocols, and Security

 
3-Applied Python for Professionals

 
4-Beginners Guide to NMAP and Zenmap

 
5-Securing Your Network from Attacks

 
6-Windows Penetration Testing Essentials

 
7-OSINT - Open-source Intelligence

 
8-Session Hijacking and Prevention Techniques

 
9-Shell Scripting with Bash

 
10-Reverse Engineering Part – 1

 
11-Reverse Engineering Part – 2

 
12-Build Microservices with Spring Cloud and Spring Boot

 
13-5G Security Deconstructed

 
14-Exploitation with Kali

 
15-OSINT Level 2

 
16-OWASP Top 10 Security Fundamentals (LIMITED-TIME BONUS)

 
17-Mastering Database Reconnaissance and Exploitation (LIMITED-TIME BONUS)

 
18-How to succeed in a Data Protection Officer Role (LIMITED-TIME BONUS)
Top 10 trending github repos of the week😘.
Tags: javascript, docker, node, go
Published: 2021-11-19 11:37:31

---
title: Top 10 trending github repos of the week😘.
published: true
description: Most popular trending Github repos in this week.
cover_image: https://source.unsplash.com/featured/?coding
tags: javascript,docker,nodejs,go
series: Weekly Github top 10
---
GitHub is where over 65 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and features, power your CI/CD and DevOps workflows, and secure code before you commit it.

Here is the most popular repos published on this platform.

## #1
![social banner of repo](https://opengraph.githubassets.com/2a8d7d00462ff04c8a69b13bac2a42ab1e3dc43fd81678c8d5e9dc93388dbd93/alan2207/bulletproof-react)
{% github alan2207/bulletproof-react %}

## #2
![social banner of repo](https://opengraph.githubassets.com/0b3f5337b7feb5ad01ded532d300492949217dd6d06de9bae36af3a73087f3c6/xmrig/xmrig)
{% github xmrig/xmrig %}

## #3
![social banner of repo](https://opengraph.githubassets.com/7947357fe660e2ecb5144f6e9f1e85aa728c220496b333c79f14bd9fd31c71a9/airbnb/javascript)
{% github airbnb/javascript %}

## #4
![social banner of repo](https://opengraph.githubassets.com/22c60c34bf29aff01fd92f7cce76c959fcaf5d6bd993798bf94c044c86d66325/zero205/JD_tencent_scf)
{% github zero205/JD_tencent_scf %}

## #5
![social banner of repo](https://opengraph.githubassets.com/df4518016eaab1d243ed4bfa78a452a712ea764e43a7d49f99856d5df883162e/restic/restic)
{% github restic/restic %}

## #6
![social banner of repo](https://repository-images.githubusercontent.com/184909163/d2ae7e00-d558-11e9-8468-33ce04888bac)
{% github koekeishiya/yabai %}

## #7
![social banner of repo](https://opengraph.githubassets.com/0e6ab9a2a30025b6a3994ddd2e494ed9baa985393e3e8bce84390b6f36d0cf3c/fatedier/frp)
{% github fatedier/frp %}

## #8
![social banner of repo](https://opengraph.githubassets.com/df928e0e26c1026595f3732d01e8bc2e8bc2ac713496e010fb354f1460c4986e/nvm-sh/nvm)
{% github nvm-sh/nvm %}

## #9
![social banner of repo](https://repository-images.githubusercontent.com/269336148/a2a43380-4055-11eb-8ad9-d2c367991ffb)
{% github sickcodes/Docker-OSX %}

## #10
![social banner of repo](https://repository-images.githubusercontent.com/74293321/6cef4300-6605-11e9-92a3-9171a14b1e2d)
{% github sveltejs/svelte %}

Enjoy these repos.
Follow me for more articles.
Thanks 💖💖💖
“Learn Amazon SageMaker, 2nd edition” is out!
Tags: deeplearning, machinelearning, mlops, aws
Published: 2021-12-03 08:10:05

---
title: “Learn Amazon SageMaker, 2nd edition” is out!
published: true
date: 2021-11-19 11:37:13 UTC
tags: deeplearning,machinelearning,mlops,aws
canonical_url: https://julsimon.medium.com/learn-amazon-sagemaker-2nd-edition-is-out-e84f3805e2f5
---

“[Learn Amazon SageMaker, 2nd edition](https://www.amazon.com/Learn-Amazon-SageMaker-developers-scientists/dp/1801817952/)” is officially released today. You can order it on Amazon.com and everywhere else

[Learn Amazon SageMaker: A guide to building, training, and deploying machine learning models for developers and data scientists, 2nd Edition](https://www.amazon.com/Learn-Amazon-SageMaker-developers-scientists/dp/1801817952/)
What’s new in Angular, React Router, Cypress and Other News - Frontend News #22
Published: 2021-11-19 11:34:16

{% youtube w-nOya59Zho %}
What happened in the world of frontend in the last weeks? Watch the newest episode to be up to date! 👇

What’s in Frontend News #22?
🟣 New Github CEO
🟣 Creator of Svelte join Vercel
🟣 Identify NPM libraries
🟣 Update to AirBnb style guide
🟣 Cypress 9.0.0 release
🟣 Deno 1.16 release
🟣 React Router v6
🟣 Angular v13 is on!

Enjoy, you can read the article at [Frontend House](https://frontendhouse.com/frontend-news/whats-new-in-angular-react-router-cypress-and-other-news-frontend-news-22)
Simple JS UI Components
Tags: javascript, webdev, beginners, tutorial
Published: 2021-11-19 11:30:35

The [Web Component APIs](https://developer.mozilla.org/en-US/docs/Web/Web_Components) in JavaScript are great, but they're relatively new and kinda hard to learn. They're also struggling to gain traction in the industry still (at the time of writing), making them a little risky to invest in. In the meantime, there are simple patterns you can follow to make components in vanilla JavaScript without the Web Component APIs.

First, let's establish a more declarative way to create a DOM node. You can use a library like jQuery, or define a function to do it yourself. In this article let's use our own function called `$`.
```javascript
// Return a DOM element created from parsing the HTML string
function $(html, properties = {}) {
  const template = document.createElement("template");
  template.innerHTML = html.trim();
  const element = template.content.firstChild;

  // Copy the properties to the element
  Object.assign(element, properties);

  return element;
}
```
Usage:
```javascript
const form = $(`<form></form>`);
```

Now let's make a little component. Let's say we want a generic CRUD form component...

```javascript
function newCrudForm(data, mode) {
  const form = $(`<form></form>`);

  render(mode);

  function render(mode) {
    form.innerHTML = "";

    const disabledInRead = mode == "read" ? "disabled" : "";

    form.append(
      $(`<label>Text: </label>`),
      $(`<input type="text" ${disabledInRead} />`, {
        value: data.text,
        // NOTE: Using this method syntax will bind 'this' to the textbox
        oninput() {
          data.text = this.value;
        },
      }),
      $(`<button>${mode == "read" ? "Edit" : "Save"}</button>`, {
        onclick() {
          const newMode = mode == "read" ? "update" : "read";
          render(newMode);
        },
      })
    );
  }

  return form;
}
```
_Note: For simplicity, I didn't implement two-way binding, but it can be added to `$` easily_

Usage:
```javascript
const data = { text: "example text" };
document.body.append(newCrudForm(data, "read"));
```
## Explanation
`newCrudForm` returns a form element with its own "state". Its state consists of the `data` object and the `mode` string. The `data` state is bound to the textbox. To change the `mode` state and _react to the change_, we just need to re-render and pass in a new value. That's what the button does.

_Note: "state" is just the info associated with a component_

## Conclusion
Hopefully you'll find this easier to learn than the Web Component APIs like I did. Thoughts? Questions? Criticism? Leave a comment below 👇
What The Future Holds For Cloud Computing 
Published: 2021-11-19 08:50:03

In recent years, cloud computing has become a popular trend in the technology industry. As more and more companies adopt this new way to do business, it's important for businesses to keep up with what the future holds for cloud computing. In this article, we'll explore AWS managed cloud services and other ways that you can make sure your company stays on top of things as they change! 

<a href="https://www.zehncloud.com/aws-managed-cloud-services/">AWS managed cloud services</a> ensure that your company's data is safe at all times without you having to pay the high costs of hiring an in-house team. It also takes away your worries about ever-increasing maintenance fees as AWS always keeps up with price changes and offers competitive rates! 

If you run multiple locations, it can be difficult to keep up with things like disaster recovery. AWS offers cloud-based storage solutions that make it easy for you to store your data in the cloud and let AWS worry about backups, security protocols, or scaling needs! 

<a href="https://www.zehncloud.com/24-7-aws-cloud-support-and-maintenance-services/">Cloud maintenance services</a> are also available if you're interested in taking advantage of AWS's expertise but don't necessarily want all of the options under their managed service umbrella. 

The future is here and it looks to be quite bright. We’re excited about the advancements in processing power, storage space, and reliability that are coming our way.
Best Accounting and Finance Courses - Finprov Learning
Tags: financetraining, accountingtraining, accountingcourses, financecourse
Published: 2021-11-19 10:41:54

Finprov is one of the Best Accounting and Finance Training Institute in Kerala, Providing courses like Tally, CBAT, QuickBooks, GST, and Income Tax.Home of the Best Accounting and Finance Courses. Finprov provides Job-oriented finance course, accounting training from master trainers.
11 years Windows user switches to Linux.
Tags: linux, windows, devops, developer
Published: 2021-11-19 10:32:59

I am an IT student with diploma in computer engineering and currently perusing my bachelors, I have been using windows from the day i saw a computer for the first time in my life.

i was a windows user for 11 years, recently switched to Linux Mint..
my experience was mixed.

The Good.
- the way WIFI connects within seconds contrary to windows make me literally drool.
like some times my laptop would be in sleep the whole night and as soon at i wake it in the morning it already would be connected to the WIFI
on the contrary windows takes 69 years to connect
- software installation process with terminal was super straight forward, i loved it.
- your imagination is the limit when it comes to customization
- UI is ❤️😩 (or maybe windows UI is just too shitty)

The Bad
- No Photoshop, No Office, No Vegas Pro
yes there are alternatives, like libreoffice, Gimph..
i hate them, they suck.
libreoffice works but best of luck with the formatting of files your friend sent you
- random freezes, my laptop used to just freeze, nothing worked... tried everything under the sun to recover from this stuck phase and preventing it, even mad it to mint forums, nothing... only solution once there was to hard reboot.
- poor software updates, third party software updates matter because the come baring bug fixes, third party software like slack, quickdock, even whatsaap for desktop, all plagued with bugs.
- this one is not that significant but the booting time in Linux was a bit higher than the windows counterpart, not that noticeable in the long run but coming from windows immediately it caught my attention.

anywho, i came back into loving arms of windows in about two months into my Linux journey, do i regret it, No.
would i install Linux again, No.
do i feel line one os is superior than other, No.
Semantic versioning with git flow
Published: 2021-11-19 10:32:14

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

การเขียน semantic version นั้นมักจะใช้ในการเขียน Library และ API ต่างๆ ซึ่งเลข version ที่เป็น semantic version นั้นจะประกอบไปด้วยเลข 3 ส่วนคือ  x.y.z ( ไม่มี z ก็ได้ )

โดยที่เลขแต่ละตัวนั้นหมายถึง

X คือ Major  Version
Y คือ Minor  Version
และสุดท้าย Z คือ Patch Version

 
`Major` จะเป็นตัวเลขในการเปลี่ยน version ครั้งใหญ่ เช่น เปลี่ยนโฉม UI เลย ตัวเลข Major จะเปลี่ยนเพิ่มขึ้น ก็ต่อเมื่อ API เปลี่ยนแบบ breaking change หมายถึงเปลี่ยนแปลงแบบ application หรือ software รอบข้าง มีสิทธิ์พัง กระทบ จำเป็นต้องอัพเดต code

`Minor`: เป็นการเปลี่ยนในลักษณะการเพิ่มของใหม่ feature ใหม่ ในลักษณะ backward compatible หมายความ การเพิ่มใหม่ ต้องยังคงทำให้เก่ายังทำงานได้ปกติ (คือ code feature เก่าเปลี่ยนแปลงได้ แต่ผลคือ feature เก่ายังต้องทำงานได้เหมือนเดิม)

`Patch`: เป็นตัวเลขย่อยหลักสุดท้าย นั่นคือ มีการเปลี่ยนแปลง code ในลักษณะของการซ่อมแซมของเดิมเท่านั้น (ไม่ทำให้ feature เดิมขาดหายไป) แต่เป็นการ fix ซ่อม เพื่อแก้ bug แก้ defect เท่านั้น

# Git Flow
รูปแบบการทำงาน [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/) นั้น ถูกเผยแพร่โดย [Vincent Driessen](https://nvie.com/about/) เป็นรูปแบบการแตกแขนงที่ช่วยให้สตรีมหลายลําที่มีขอบเขตที่เข้มงวดระหว่างพวกเขา หลักการหลักค่อนข้างง่ายและใช้งานง่าย
Git Flow เป็นความหมายที่เป็นมิตรของ SemVer ที่ช่วยให้นักพัฒนาสามารถสร้างสาขาสําหรับแต่ละคุณสมบัติแพตช์รีลีสหรือ hotfix

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3hf608yygvo52l3aab3p.png)
From A successful Git branching model
How to install Docker in Linux Mint and Ubuntu
Tags: docker, linux, tutorial
Published: 2021-11-19 10:24:37

Today I will show you how to install Docker in Linux Mint and Ubuntu. Docker is a very useful tool which every developer should know. Using Docker you can run many applications with special containers. They are beside your system. For instance you code in php and you need php in your system to run application. With Docker you can install and run many versions of php. Let’s start!

## Option 1 - manual installation

First of all we should update the package lists:

```shell
sudo apt-get update
```

Next we have to install dependencies:

```shell
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
```

Perhaps you have installed all dependencies. After installing dependencies we have to add GPG key:

```bash
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```

and repository:

```bash
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(. /etc/os-release; echo "$UBUNTU_CODENAME") stable"
```

When we add a new repository we have to remember to update package lists. So one more time we run sudo apt-get update .

Then we can install Docker in Linux Mint and Ubuntu (we install also docker-compose):

```bash
sudo apt-get install docker docker-compose
```

After installing Docker we have to add our user to a docker group:

```bash
sudo usermod -aG docker $USER
```

It is necessary in order to run Docker without root privileges (without sudo). In my opinion running Docker with sudo is not a good idea. Remember restart machine after adding your user to group!

We can check our installation:

```bash
docker -v
docker-compose -v
docker run hello world
```

You should see the version of docker and docker-compose.
If you will see it, it means that your installation is correct.

![Decker instaled](https://varlock.net/wp-content/uploads/sites/1/docker-installed.png)

## Option 2 - automatic installation 

I wrote a shell script which install Docker in Linux Mint and Ubuntu automatically:

{% gist https://gist.github.com/texe/887a24b63405cb3bf7638b50c67a6fd0 %}

You can get it on my [GitHub](https://github.com/texe/install-docker-sh).

You can see tutorial on [YouTube](https://www.youtube.com/watch?v=X7h9axN5n4Q).

{% youtube X7h9axN5n4Q %}
Why and Why Not use No-Code?
Tags: webdev, codenewbie, programming, discuss
Published: 2021-11-19 10:24:08

As my no-code blog just blasted off, here's another. So, in this blog, I will tell some reason to use and some reason to not use no-code.

### What is No-Code?

A no code development platform is a tool for building software applications without coding. No-Code is made for people in every background to create stuff/software. No code platforms have pre-built drag-and-drop elements that have been coded for reuse and scale, so that anyone, even beginners can make anything they want easily.

### How does it even works?

As told above, no code tools already got drag-and-drop elements which you can use to create your website. You can then easily see, how will it look in desktop, tablet, phone.

When you build on a no code platform, you are building with code, you simply don’t have to do any coding, as those drag-and-drop elements ( and the whole software ) is build using code.

Following me on twitter helps me a lot [so consider following](https://twitter.com/vikstack)

### Why use no code?

Okay so lets now come to the point, why we should use no code?

##### Faster Development
Most development is done via a drag-and-drop interface, so this means building something will be a lot faster than using code.

##### Low Cost
Developers are expensive, using no code tools will let you reduce it. You can build apps faster and cheaper.

##### Increased Productivity
As the building time of something is way less than using code, it simply means that the thing that was being done in months can now be done in days.

###### There are many more reasons to use no code, but for this blog, its enough.

### Why not use no code?

okay so as I told you the pros of no code lets come to cons of no code.

One of the most common problem with no code is for more complex use cases, they are too restrictive to produce the desired results. The drag-and-drop elements are inherently more restrictive than the underlying code.

##### Users must have a clear understanding of their requirements.
while using no code platforms a user first need to thing that if the requirements can be fulfilled by that specific tool?

##### Extensive Training Required
As no code tools make development faster, you need extensive training before. Some no code tools are a lot too harder to understand

There are yet many many other way that stops you from using no code.

Thanks for reading this blog. Cheers
DevTips Daily Update 19/11/21
Tags: devtipsdaily, beginners, javascript
Published: 2021-11-19 10:03:19


So in this week's videos on DevTips Daily, we made a start on our full end to end project mini-series.  We got cracking with the project idea, took a look at writing Agile User Stories and got some boilerplate code setup using the NX CLI.

Here's a link to each individual tutorial:

[Project Management Tools](https://youtu.be/O7qf1nmswF4)
{% youtube O7qf1nmswF4 %}

[Writing Agile User Stories](https://youtu.be/6N7PuJ4CO-4)
{% youtube 6N7PuJ4CO-4 %}

[Project Name and Domain](https://youtu.be/E6p6_ST-Xg8)
{% youtube E6p6_ST-Xg8 %}

[Code Setup With NX](https://youtu.be/LFYVpxXg64I)
{% youtube LFYVpxXg64I %}

[Serving the API with NX](https://youtu.be/Eg4mYYBdhxU)
{% youtube Eg4mYYBdhxU %}

[Creating the GitHub Repository](https://youtu.be/hgPRaPd2XcA)
{% youtube hgPRaPd2XcA %}

[Generate SSH Key Pair](https://youtu.be/EkQPw2zfP3Y)
{% youtube EkQPw2zfP3Y %}

Next week we're going to be carrying on with the project, setting up a server to host the project files, building a CI pipeline and more!

Thanks for watching 👍