teleren/devto huggingface dataset:
Build your own SSO Service with next-auth integration
Published: 2024-06-15 03:52:14

The SSO Service is a robust Single Sign-On (SSO) solution designed to streamline authentication and authorization across multiple applications. Users can authenticate once and seamlessly access various applications without the need for repeated login.

## Installation

To install and run the SSO Service, follow these steps:

1. Clone the repository:

    ```bash
    git clone https://github.com/priyanshuverma-dev/sso-service.git
    ```

2. Install the dependencies:

    ```bash
    cd sso-service
    yarn
    ```

3. Configure the SSO Service:

    - Open the `.env.example` file and update essential configuration options, including database connection details and secret keys.

4. Start the SSO Service:

    ```bash
    yarn dev
    ```

For detailed information on utilizing the SSO Service endpoints, refer to the [API documentation](git clone https://github.com/priyanshuverma-dev/sso-service#).

## Features

### 1. Centralized Authentication and Authorization

   The SSO Service provides a centralized mechanism for handling authentication and authorization, ensuring a seamless experience across multiple applications.

### 2. Multiple Authentication Providers

   Support for various authentication providers, including email/password and social logins, allowing users to choose the method that suits them best.

### 3. Session Management and Token-Based Authentication

   Efficient session management and secure token-based authentication for enhanced user security.

### 4. Role-Based Access Control (RBAC)

   Fine-grained authorization controls through Role-Based Access Control, enabling administrators to manage user permissions effectively.

### 5. Customizable Login and Registration Flows

   Flexibility to customize login and registration processes to align with specific application requirements.

## Implementation

The implementation details of the SSO Service can be found in the [sso-implementation repository](https://github.com/priyanshuverma-dev/sso-implementation). This repository provides examples and usage guidelines for seamlessly integrating the SSO Service into your applications.

## Contributing

Contributions to the SSO Service are welcome! If you wish to contribute, please follow the guidelines outlined in the [CONTRIBUTING.md](git clone https://github.com/priyanshuverma-dev/sso-service/CONTRIBUTING.md) file.

## License

This project is licensed under the MIT License.
Custom SSO Implementation
Tags: webdev, programming, opensource, typescript
Published: 2024-06-15 03:49:15

The SSO Implementation repository contains the implementation details and examples for seamlessly integrating the SSO Service into your applications.

## Repository Link

[SSO Implementation Repository](https://github.com/priyanshuverma-dev/sso-implementation)

## Features

### 1. Example Integrations

   Explore comprehensive examples demonstrating how to integrate the SSO Service into various types of applications, providing a foundation for seamless authentication and authorization.

### 2. Usage Guidelines

   Clear and detailed guidelines on using the SSO Service within your applications, ensuring a smooth and secure single sign-on experience for end-users.

### 3. Customization Possibilities

   Learn how to customize and extend the SSO Service to fit the specific requirements of your applications. Examples include incorporating custom authentication providers and tailoring login flows.

### 4. Best Practices

   Access best practices for implementing SSO, including security considerations, error handling, and optimizing user experiences.

### 5. Troubleshooting

   Troubleshooting tips and common solutions to address potential issues during the integration process.

## Getting Started

To integrate the SSO Service into your application, follow these steps:

1. Clone the SSO Implementation repository:

    ```bash
    git clone https://github.com/priyanshuverma-dev/sso-implementation.git
    ```

2. Explore the examples and usage guidelines provided in the repository.

3. Customize the integration based on your application's requirements using the customization examples.

## Documentation

For detailed information on using the SSO Service in your applications, refer to the [SSO Implementation Documentation](https://github.com/priyanshuverma-dev/sso-implementation/#).

## Contributing

Contributions to the SSO Implementation repository are welcome! If you would like to contribute, please follow the guidelines outlined in the [CONTRIBUTING.md](https://github.com/priyanshuverma-dev/sso-implementation/CONTRIBUTING.md) file.

## License

This project is licensed under the MIT License.
How to create Windows 11 VM on Microsoft Azure (Step by step guide)
Tags: azure, virtualmachine, cloudcomputing
Published: 2024-06-15 03:30:12

**Introduction**

Virtual Machine (VM) is a digitized version of a physical computer and they can run programs and operating systems, store data, connect to networks, and do other computing functions. 

Azure VM uses entirely virtual resources provided by Microsoft Azure Platform. It gives more control over the computing environment and flexibility of virtualization without having to buy and maintain the physical hardware that runs it.

This blog post is a step by step guide to create and deploy a windows 11 VM on Azure. 

**Here are the steps:**

Sign up/in to Azure portal, 
Create VM,
Assign resource-specific settings,
Validate the assigned settings,
Initiate the resource.

**Sign up/in to Azure portal**

If you don't have an Azure subscription, click [here](https://azure.microsoft.com/en-us/free/?WT.mc_id=A261C142F) to create a free account and then sign in to Azure portal. 

**Create VM on Azure**

After completing your sign up, follow the steps below: 

a. In the search bar, type "Virtual Machine"
b. From the search results, select "Virtual Machine" from the list of resources and click create.
c) Give your virtual machine a name
d) In the region section, select the location you want your virtual machine to be

_A region refers to a specific geographical location with data centers that host infrastructure and services. Each region operates independently and is designed to be self-contained, with its own set of resources and infrastructure._

e) Then, click on the drop-down to select your availability option and availability zone.

_In Azure, a region can consist of three availability zones, known as Zone 1, Zone 2 and Zone 3. Each zone has one or more data centers that are kilometers apart from each other.
_
Create laravel project on Project IDX
Published: 2024-06-15 03:10:19

Google has launched a beta version of project IDX, an IDE that works on browsers. 

To create a new laravel project click go the [idx.google.com](https://idx.google.com/) and "Select all the templates"

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

Select Backend > laravel 

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

Give a name to your project 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l33cwyoqbfep3ouxx0s1.png)


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

And here you go, your laravel is ready to play

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

You can share the link that can be accessible over the internet.
The IDX has all the features just like the VS Code 

However, IDX is now supporting only one project. Here you can delete share or rename your project

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0u97wrygp50480ifvvl8.png)
1.1 - Um primeiro programa simples
Tags: java
Published: 2024-06-15 02:45:54

**Programa Java Simples:**
**- Descrição:** Programa básico em Java que exibe uma mensagem no console.
**- Nome do Arquivo:** Deve ser "Example.java" para corresponder à classe principal "Example".

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

**Passos para Compilar e Executar:**
**- Inserindo o Programa:**
Use um editor de texto simples, como WordPad no Windows, para evitar formatação adicional que pode confundir o compilador.

**- Compilando o Programa:**
Utilize o comando javac Example.java no prompt de comando para compilar o arquivo "Example.java" e gerar o bytecode "Example.class".

- Executando o Programa:
Utilize o comando java Example para executar o programa Java. Isso imprimirá a mensagem "Java drives the Web." no console.

**- Estrutura do Programa:**
Comentários: Incluídos para documentação e devem começar com /* e terminar com */.

**- Definição de Classe:**
 Começa com class Example { e termina com }. Todo o código Java deve estar dentro de uma classe.

**Método main(String args[]):**
Declaração pública (public) e estática (static), permitindo o início da execução do programa.
Retorna void, indicando que não retorna valor.

**String args[]:** Parâmetro que pode receber argumentos da linha de comando, mas não é utilizado neste exemplo.
Sistema de Saída (System.out.println):
Método usado para imprimir "Java drives the Web." seguido de uma nova linha no console.

- Detalhes de Compilação e Erros de Sintaxe:
Todos os arquivos .java devem ser compilados para bytecode .class antes da execução.
Erros de sintaxe são reportados pelo compilador e devem ser corrigidos para compilar e executar o programa corretamente.
Iron IPTV Pro
Published: 2024-06-15 02:35:52

Dans l’ère actuelle où la technologie révolutionne chaque aspect de notre vie quotidienne, le divertissement n’est pas en reste. Avec l’émergence de plateformes de streaming, la télévision sur Internet est devenue la norme pour de nombreux foyers à travers le monde. Parmi les innombrables options disponibles, une se distingue par sa qualité, sa fiabilité et sa richesse de contenu : [Iron IPTV](https://abonnementiptv.ma/produit/iron-iptv-pro/

Iron IPTV représente bien plus qu’une simple plateforme de streaming ; c’est une porte ouverte sur un monde infini de divertissement. Mais qu’est-ce qui distingue Iron IPTV des autres fournisseurs de services IPTV ? C’est ce que nous allons explorer.

Tout d’abord, la qualité du contenu. Iron IPTV offre une sélection diversifiée de chaînes de télévision, allant des chaînes locales aux chaînes internationales, couvrant une gamme de thématiques allant des sports aux actualités en passant par le divertissement. Cette variété garantit que chacun trouve son bonheur, quel que soit son intérêt.

Ensuite, la fiabilité. Rien de plus frustrant que de subir des interruptions constantes ou des temps de chargement interminables lorsqu’on essaie de regarder son émission préférée. Avec Iron IPTV, la fiabilité est une priorité. Grâce à une infrastructure robuste et à des technologies de diffusion de pointe, les abonnés peuvent profiter de leur contenu sans interruption, quel que soit l’endroit où ils se trouvent.
Shell >> Redirections >> Capture
Published: 2024-06-15 02:10:47

- Redirection meanings What ? Changing something.
- Instead of putting the output to the screen instead redirect to the file.
- ">" redirect and over write 
- ">>" will always append.

```
#!/bin/bash
read -p "Enter ur name: " name
echo " Welcome to BOMBAY $name !!"
```

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

Also , you can choose which line needs to , go to the file.

```
#!/bin/bash
read -p "Enter ur name: " name 
echo " Welcome to BOMBAY $name !!" > log.txt
echo " Vanakam THozha " >> log.txt
echo " -- EOL -- "
```

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

## /dev/null

- it will make it as NULL
- it will work only for the regular consoles.

1 --> console output ( By default it works only for standard console output ) eg., > or >>
2 --> Error 

## nohup

- script will run in background.
- the process will run behind us and it won't show in the console.
- it creates nohup.out 
- & --> run it in the background.

```
#!/bin/bash
num=1
while [0]
do 
	echo "Number is $num"
	num = `expr $num + 1`
done
```

**_nohup file.sh 2>&1 &_**

## Capturing

- back ticks var = **`ls | wc -l`** ``or 
- $(command) var = $( ls | wc -l ) 

Both will return the value.

- One problem with backtick is " it wont support nested parameters ".

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

so use $()

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/amkpm0wlkcjupqm2h4hf.png)
The Timeless Charm of Men's Hats: A Style Guide for Every Occasion
Published: 2024-06-15 02:10:11

screenshot-1718413118997.png

The many benefits of Guys's Hats

Hats are not limited to security from the sunlight and cold, nonetheless there is benefits that are also several 

Hats can add on a beauty like little style to your ensemble, making the wearer be noticed through the team 

They could additionally help hide a locks like negative and protect the most notable from ecological elements 

Hats could possibly be used for virtually any event, from the casual day out to a conference like formal 

Innovation in Men's Hat Design

Men's hat designs have evolved after a while, through the straw mens fedora hats like classic to your contemporary snapback 

Hat manufacturers continue to innovate with new materials and designs to spotlight every possible significance of the person like modern 

Hats happens to be able to be made of numerous materials, including wool, thought, leather, also recycled materials 

Protection and Use of Guys's Hats

Aside from incorporating style, hats additionally serve an objective like functional 

Some hats provide defense contrary to the sunlight and UV rays, while some will keep the peak hot in cold weather 

Hats provide the additional asset like advantageous associated with the top from flying debris or accidental bumps 

Whenever used properly, hats may help avoid injury 

Day just how to make use of Hats in Your Every life

Accessorizing having a mens caps and hats shall not be complicated 

Start with choosing that fit properly and complement your thing and ensemble 

For the event like adhere like formal classic hats such as the fedora or perhaps the bowler 

For the like casual, think about a baseball cap or even a beanie day 

Be sure to match the hat utilizing the event as well as your personal style 

Quality and Application of Men's Hats

While searching for a hat, it is important to spend money on quality merchandise 

Quality hats are manufactured from durable materials and generally are made to last long despite regular usage 

Also, some hats might be individualized with logos or emblems for branding purposes 

Whether it's for personal advertising or usage purposes, hats really are a versatile and accessory like timeless any man 



In conclusion, straw mens fedora hats have been around for decades and continue to be a popular fashion statement. They come in a variety of styles, materials, and designs, making them a versatile accessory for any occasion. Not only do they add style to any outfit, but they also serve a functional purpose in protecting the head and face from environmental elements. Whether it's for personal use or for branding purposes, hats are a great investment for any man.

Source: https://www.lynguu.com/application/straw-mens-fedora-hats
Academic research on motivation in IT developers
Tags: programming, productivity, career, computerscience
Published: 2024-06-15 02:00:55

Hello everyone, for my final academic thesis I am conducting a survey on motivation in IT developers.
I have produced a questionnaire aimed exclusively at those who already work in this sector and which takes only two minutes to fill out:

https://forms.gle/pkqfMRMjFrN6TmZN6

You would be a great help in collecting data if you could fill it out.
I would also be really grateful if someone could also help me in sharing the link with colleagues!
Thank you all so much in advance 🫶🏼
Running DeepCell on Google Batch with node pools
Tags: googlecloud, serverless, bioinformatics, scale
Published: 2024-06-15 01:27:36

As part of our ongoing work to run DeepCell on GCP, I'm pleased to share our benchmarking results using Google Batch's private preview feature: node pools.

Node pools allow Batch to reuse infrastructure across jobs, which can improve end-to-end performance for jobs with a lot of setup time (like our 3 GB container). Using a node pool reduced our benchmark time by 80%. 😎

https://medium.com/@dchaley/running-deepcell-on-google-batch-with-node-pools-8fe7d1c121a2
[Game of Purpose] Day 27
Tags: gamedev
Published: 2024-06-15 00:24:16

Today I tried to make flying with physics with [this tutorial](https://www.youtube.com/watch?v=IT9Rlyy-bSE). I wanted to fly with a simple mesh, so I started with a simple cube. I'm not yet sure how Torque works and what it is, but I followed the tutorial and it indeed flies :)

However, when flying forward/backward and sideways it looses altitude despite following the tutorial. I'd need to understand how it all works.

{% embed https://youtu.be/mPUNVMDYnq4 %}
How @AliasFor Simplifies Annotations usage in Spring
Tags: java, spring, springboot, programming
Published: 2024-06-14 23:35:43

This annotation is an annotation that allows you to create an alias for an attribute in an annotation. These attributes have the same function. The idea is to avoid confusion when multiple attributes can be used for the same purpose

Maybe this is the first time you have seen it.

Spring uses this annotation in places like `@Bean`, `@ComponentScan`, `@Scope`, `@RequestMapping`, etc.

So it’s more used internally. And maybe you are already using its functionality and don’t even know.

Let’s take a look at how `@RequestMapping` is using this annotation:

```java
@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Mapping
@Reflective({ControllerMappingReflectiveProcessor.class})
public @interface RequestMapping {
    String name() default "";

    @AliasFor("path")
    String[] value() default {};

    @AliasFor("value")
    String[] path() default {};

    RequestMethod[] method() default {};

    String[] params() default {};

    String[] headers() default {};

    String[] consumes() default {};

    String[] produces() default {};
}

```

The attributes `path` and `value` have the same purpose, they define the URL pattern for your request mappings.

The scenario below shows how the effect is the same and you can choose the alias you want.

```java
@Controller
public class AlisForController {

    @RequestMapping(value = "/home", method = RequestMethod.GET)
    public String homePage() {
        return "home";
    }

    // Equivalent to the above using 'path'
    @RequestMapping(path = "/home", method = RequestMethod.GET)
    public String homePage2() {
        return "home";
    }
}

```

Have you ever seen this before?

Have some dev defined the `path` and in another controller, you found that it’s using a `value` for the same purpose, and somehow everything works, now you know why it works.

## **Conclusion**

So, pay attention to your project, have you found any places where this happened? Open the annotation’s code and see the `@AliasFor` there.

If you like this topic, make sure to follow me. In the following days, I’ll be explaining more about Spring annotations! Stay tuned!

Follow me!
RECONSIDER YOUR PATH TO SUCCESS AS A SOFTWARE ENGINEER
Tags: softwareengineering
Published: 2024-06-14 23:15:15

I've observed a prevailing trend in the software engineering community: a fixation on creating products and acquiring minimal knowledge to meet requirements. However, it's crucial to realize that product development is not the ultimate goal.

Seasoned engineers dedicate significant time to maintaining, scaling, rewriting, and refactoring software. This is where the true magic unfolds. Achieving this level of expertise demands mastering technologies meticulously. It's not merely about completing tasks; it's about comprehensively grasping the tools at your disposal.

By delving deep and honing your skills, you enhance your problem-solving abilities and unlock innovative potential beyond imagination. Early on, concentrating solely on product creation can be deceptive. Embrace the path to mastery. That's where genuine breakthroughs take place.
Create A Vim Plugin For Your Next Programming Language, Indentation and Autocomplete
Tags: vim, extension
Published: 2024-06-14 22:46:00


![Create A Vim Plugin For Your Next Programming Language, Indentation and Autocomplete](https://cdn-images-1.medium.com/max/640/1*-Tnknln64FH-mN1QWd2Tkg.gif)

In the [previous post](https://dev.to/abderahmanemustapha/create-a-vim-plugin-for-your-next-programming-language-structure-and-syntax-highlight-1dog-temp-slug-8281004), i discussed how to structure our vim plugin, and how we can add the beautiful syntax highlight feature.

In this short post, i will explain how to add a simple auto-complete in addition to indentation, if you want to see a full example of a working vim extension for a new programming language, please check this [GitHub repository](https://github.com/abderrahmaneMustapha/vim-iop)

### Indentation

So first we need to create a new file in ftplugin directory, if you want to know more about autoload and other vim extension folders make sure to check the first part of this blog post [here](https://dev.to/abderahmanemustapha/create-a-vim-plugin-for-your-next-programming-language-structure-and-syntax-highlight-1dog-temp-slug-8281004)

The name of the new file is iop.vim, we will show a short example of how we handled indentation in our extension, you can check the full file here

```
:inoremap { {<CR><tab><CR><bs><bs><bs><bs>}<up><tab>
```

Essentially, we are telling our IDE that if a user opens a bracket and then hits enter, and of course, when we press enter, we will jump to a new line with this command above the cursor will not begin at the beginning of the line but will left some space behind, the space here is represented by the <tab>.

In our case, we defined the space in the fifth line of our file as you can see below

```
set tabstop=4
```

### Autocomplete

It is time to discuss autocomplete, so we can end this blog post.

You will need to create two new folders text and [autoload](https://github.com/abderrahmaneMustapha/vim-iop/tree/main/autoload) in the text folder we will put all the possible worlds in our new programming language, in our case we created 4 files, one for decorators, another one for types, values, and iop.text file is for identifiers.

These four files are imported in autoload/iopcomplete.vim file, this last-mentioned file contains the autocomplete logic you can check the full file here at this [link ](https://github.com/abderrahmaneMustapha/vim-iop/blob/main/autoload/iopcomplete.vim).

This was just a general description of what we did to create a new simple vim extension, for this new programming language, you can understand more by reading the code in the[Github repository.](https://github.com/abderrahmaneMustapha/vim-iop)