teleren/devto huggingface dataset:
Virtual Machine Manager QEMU+SSH ile Uzak KVM Sunucusuna Bağlanma ve Yönetme
Tags: linux, beginners, tutorial, virtualmachine
Published: 2023-07-21 09:07:12

Virtual Machne Manager veya benzeri uygulamalarla local makinamızda kolayca Sanal makinalar oluşturup yönetebilmekteyiz. Ancak bazı durumlarda Sanal makinalarımızı local makinamızdan yönetmek veya erişmek doğru bir tercih olmayabiliyor. Bu gibi durumlarda **qemu+ssh** yardımımıza yetişiyor.

**1- Uygulama Arayüzüne Erişim**

Başlatıcımızdan veya terminalimizden uygulamayı açalım

Terminalden açmak için aşağıdaki komutu çalıştırabiliriz.

``` bash
virtmanager &
```


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

2- **ssh-askpass Paketinin Kurulması**

Aşağıdaki komutla **ssh** parolasını girebilmemiz için gerekli olacak **ssh-askpass** paketini kuralım. 

``` bash
sudo apt install ssh-askpass 
```

3- **Connection Oluşturulması**

File -> Add Connections altına girelim, aşağıdaki gibi bir ekran bizi karşılıyor olacaktır.


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


4- **Hypervisor Alanının Düzenlenmesi**

**Hypervisor** alanını **_Custom URI_** olarak düzenledikten sonra **_Custom URI_** alanına uzak kvm sunucumuzun bligilerini girecek şekilde düzenleyelim.


``` bash
qemu+ssh://<username>@<server-ip-address>/system

```
şeklinde aşağıdaki örnkte de olduğu gibi düzenleyelim.

``` bash
qemu://ubuntu@192.168.2.100/system
```

sonrasında **Connect** butonuna basarak açılan pencerede sırası açılacak olan ssh fingerprint doğrulamasına **yes** yazarak parola ekranına devam edelim.

 Parolamızı da girdikten sonra local bilgisayarımızda yönettiğimiz şekilde bilgisayarımızdan KVM sunucumuzu yönetiyor olacağız.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v2phki44668wjcrk635f.png)
How to deploy HA Elasticsearch cluster using AWS ECS and terraform
Published: 2023-07-21 09:02:00

Hi, Elasticsearch fans

If you are interested at "How to deploy HA Elasticsearch cluster using AWS ECS and terraform", then welcome to series of articles related to it:

- [HOW TO DEPLOY HA ELASTICSEARCH CLUSTER AT AWS ECS USING TERRAFORM - PART 1](https://sergiiblog.com/how-to-deploy-ha-elasticsearch-cluster-at-aws-ecs-using-terraform/)
- [DEPLOYING ELASTICSEARCH CLUSTER AT AWS ECS – ELASTICSEARCH DOCKER FILE AND AWS ECR -PART 2](https://sergiiblog.com/deploying-elasticsearch-cluster-at-aws-ecs-elasticsearch-docker-file-and-aws-ecr/)
- [DEPLOYING ELASTICSEARCH CLUSTER AT AWS ECS – ECS IAM PROFILE TERRAFORM MODULE - PART 3](https://sergiiblog.com/deploying-elasticsearch-cluster-at-aws-ecs-ecs-iam-profile-terraform-module/)
- [DEPLOYING ELASTICSEARCH CLUSTER AT AWS ECS – ECS-EC2 TERRAFORM MODULE - PART 4](https://sergiiblog.com/deploying-elasticsearch-cluster-at-aws-ecs-ecs-ec2-terraform-module/)
- [DEPLOYING ELASTICSEARCH CLUSTER AT AWS ECS – ECS-CLUSTER TERRAFORM MODULE - PART 5](https://sergiiblog.com/deploying-elasticsearch-cluster-at-aws-ecs-ecs-cluster-terraform-module/)

Have a pleasant reading :)
Ways to unsubscribe in Angular to avoid memory leaks
Tags: angular, webdev, rxjs
Published: 2023-07-21 09:00:00

Here are 5 ways to unsubscribe in Angular to avoid memory leaks:

1. Using the Subscription variable. This is the most common way to unsubscribe from an observable in Angular. When you subscribe to an observable, you get a Subscription object back. You can use this object to unsubscribe from the observable at any time by calling its unsubscribe() method.

    ```jsx
    const subscription = observable$.subscribe(value => {
      // Do something with the value.
    });

    // Unsubscribe from the observable.
    subscription.unsubscribe();
    ```

2. Using the takeUntil() operator. The takeUntil() operator allows you to unsubscribe from an observable when a certain condition is met. For example, you could use the takeUntil() operator to unsubscribe from an observable when a component is destroyed.

    ```jsx
    const subscription = observable$.pipe(takeUntil(componentWillDestroy$));

    // Unsubscribe from the observable when the component is destroyed.
    componentWillDestroy$.subscribe(() => subscription.unsubscribe());
    ```

3. Using the take() operator. The take() operator allows you to unsubscribe from an observable after a certain number of values have been emitted. For example, you could use the take() operator to unsubscribe from an observable after 10 values have been emitted.

    ```jsx
    const subscription = observable$.pipe(take(10));

    // Unsubscribe from the observable after 10 values have been emitted.
    subscription.unsubscribe();
    ```

4. Using the first() method. The first() method allows you to unsubscribe from an observable after the first value has been emitted. For example, you could use the first() method to unsubscribe from an observable after the first user has logged in.

    ```jsx
    const subscription = observable$.pipe(first());

    // Unsubscribe from the observable after the first value has been emitted.
    subscription.unsubscribe();
    ```

5. Using the firstValueFrom() method. The firstValueFrom() method allows you to unsubscribe from an observable after the first value has been emitted, but it also allows you to listen for additional values. For example, you could use the firstValueFrom() method to unsubscribe from an observable after the first user has logged in, but you could also listen for additional values, such as the user's name and email address.

    ```jsx
    const subscription = observable$.pipe(firstValueFrom());

    // Unsubscribe from the observable after the first value has been emitted.
    subscription.unsubscribe();
    ```

It is important to unsubscribe from observables in Angular to avoid memory leaks. If you do not unsubscribe from an observable, it will continue to run in the background, even if the component that subscribed to it is no longer visible. This can lead to memory leaks and performance problems.
Introduction aux média queries
Published: 2023-07-21 08:59:37


## definition
<p>Les requêtes média (media queries) permettent de modifier l'apparence d'un site ou d'une application en fonction du type d'appareil (impression ou écran par exemple) et de ses caractéristiques (la résolution d'écran ou la largeur de la zone d'affichage (viewport) par exemple).
</p>
grâce à cette technique on peut concevoir des sites web qui s'adapte au differents types d'écran et d'orientation
### type de médias :

    - all    : pour tout les média par défaut
    - print  : pour le imprimante
    - screen : pour tout les différents type d’écran
    - speech : pour les outils de synthèse vocal

>**NB:**
<p>nous essentiellement on vas plus s’interesser au screen pour faire des pages responcive</p> 

## c’est quoi l’utilité des médias queries ?
<p>L’utilité des médias queries peut être illustré par des exemple suivant :</p>
> **ex:** 
<p>imaginer une application développer pour les mobiles (téléphones) le web étant accessible via un navigateur certain utilisateurs n’ayant pas de mobiles pourrons l'ouvrir sur ordinateur ou tablette ce qui cassera le style de l'application vis à vis du positionnement et dimensionnement </p>

///## comment utilise-t-on les media queries ?
##utilisation des medias queries
<p>Pour utiliser le media querie en css on aura besoin de specifier certain breakpoint(taille d’écran ) generalement dans le monde de developement web et mobile on a quatres  types de breakpoints qui sont : </p>
    - le desktop  (xl)
    - le laptop	  (large)
    - la tablette (md)
    - le mobile	  (sm)

### syntaxe pour les médias queries 

```css
@media média opérateur (condition){ ... règle css ...}
```
Nb : operateur est optionnel
	
 
pour spécifier un design pour un ecran de moins de 480 px :

```css
@media screen ( max-width:480px){
	/* … regles css pour petit ecran … */
}
```
>**NB:**
<p>pour spécifier les break-point on utilise les valeurs limites c’est à dire le min-width et le max-width.</p>

<p>	par ailleurs on pourra spécifier les opérateur logique comme :</p>

- only : exculsion
- and : jointure (et logique) 
- etc ...

///exemple plus demostratif
<b>ex :</b>
```css
@media only screen (max-width:1080px){ /* ---nouveaux règles css --- */}
	
@media (max-width:1400px)  and ( min-width :450px){ /* ---nouveaux règles css --- */}
```

> 
en conclusion les media queries sont tellement utile pour le site dont l’objectif visuel est la responsivité mais aussi cible une certaine catégorie d’écran et de médias pour fournir en même temps des services cible par rapport à chaque cas .

## Références
[Media queries - CSS : Feuilles de style en cascade | MDN](https://developer.mozilla.org/fr/docs/Web/CSS/CSS_media_queries/Using_media_queries) 
[Requêtes média CSS](https://www.w3schools.com/css/css3_mediaqueries.asp)
[Media query et le "responsive"](https://www.youtube.com/watch?v=wu1Sk8iOPnE)
Understanding blobs in JavaScript
Tags: javascript, programming, tutorial, webdev
Published: 2023-07-21 08:57:19

JavaScript, a powerful and flexible language, offers many features that make it a staple for client-side web development. One of these features is the Blob object, a fundamental data type that plays a crucial role when dealing with binary data.

## What is a Blob?
A Blob (Binary Large OBject) is an immutable object in JavaScript that represents raw, unprocessed data. This data can be of any type and is not limited to binary. Blobs are typically used to store data such as images, audio, or other multimedia files, though they can hold almost any data type.

The data contained in a Blob is not necessarily in a JavaScript-native format. The File interface is based on Blob, inheriting blob functionality and expanding it to provide features like `name` and `lastModified`.

## Creating a Blob
You can create a Blob object in JavaScript using the Blob constructor. Here's a simple example:

```javascript
let helloBlob = new Blob(["Hello, Blob!"], {type : "text/plain"});
```

In the example above, the Blob constructor takes two arguments:

- An array of data parts: This could be a simple array of strings, `ArrayBuffer`, `ArrayBufferView` (a typed array), Blob objects, or a mix of any of the above.
- An options object: This is optional and can be used to specify the MIME type of the data.

## Reading a Blob

```javascript
let reader = new FileReader();
reader.onload = function() {
  console.log(reader.result);
}
let blob = new Blob(["Hello, Blob!"], {type : "text/plain"});
reader.readAsText(blob);
```

In this example, the `readAsText` method is used to read the content of the blob as a string.

## Blob URLs
Blobs can also be used to create URLs that can be used to link or display binary data such as an image. This is done using the `URL.createObjectURL()` method.

Here's an example:

```javascript
let blob = new Blob(["Hello, Blob!"], {type : "text/plain"});
let blobUrl = URL.createObjectURL(blob);

// Now you can use blobUrl to display the data
console.log(blobUrl); // Outputs something like: blob:http://your-url.com/550e8400-e29b-41d4-a716-446655440000
```

The URL.createObjectURL() method creates a DOMString containing an URL representing the object given in the parameter.

In summary, the Blob object is a powerful tool in JavaScript for handling raw data. It is particularly useful for working with binary objects where you need to manipulate files, such as images or multimedia content. Understanding how to use Blobs effectively can greatly expand your JavaScript capabilities when handling complex data types.

You can read more about Blobs, and their Web API on the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/Blob).

[Read this article on Accreditly](https://accreditly.io/articles/understanding-blobs-in-javascript).
Why Developers are Migrating to the Cloud: A Look at Cost Efficiency and Scalability
Tags: webdev, programming, devops
Published: 2023-07-21 08:36:17

In the dynamic world of software development, staying at the cutting edge is critical. One of the most significant shifts in recent years is the growing migration of developers toward the cloud. This movement is primarily driven by two key factors: cost efficiency and scalability. Let's explore how these two factors are pushing developers towards cloud-based solutions.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vjejypdh8ipysqw5tlbm.png)
**Cost Efficiency: Pay As You Go**

The most compelling aspect of cloud computing is perhaps its cost efficiency. Traditional on-premise development involves hefty upfront costs for infrastructure, including servers, storage devices, and networking hardware. Moreover, there's an ongoing cost of maintenance, management, upgrades, and energy consumption.

In contrast, cloud providers offer a pay-as-you-go model. You only pay for the resources you use, with the flexibility to scale up or down based on demand. This model translates to significant cost savings, particularly for startups and small businesses.

Furthermore, cloud providers handle all the maintenance and upgrades. This means developers can focus on what they do best – creating innovative applications, instead of dealing with hardware issues.

**Scalability: Grow As You Need**

The second major advantage of cloud-based platforms is scalability. In the traditional model, if an application sees a sudden spike in users, the infrastructure might fail to handle it, leading to poor user experience or even downtime. Upgrading the infrastructure takes time and is not feasible to manage unexpected traffic.

Cloud-based platforms, on the other hand, provide on-demand scalability. This means that as your user base grows, you can easily add more resources to handle the increased traffic. Similarly, during periods of lower traffic, you can scale down to avoid paying for unused capacity.

Moreover, the global nature of cloud platforms ensures that your application can handle users from around the world without any performance issues. This global reach is crucial in today's interconnected world.

**The Future is in the Cloud**

The benefits of cloud-based development platforms extend beyond cost savings and scalability. They also offer access to innovative technologies like AI, machine learning, and IoT, along with robust security features and disaster recovery solutions. These advantages are making the cloud an increasingly attractive choice for developers.

In conclusion, the migration towards the cloud isn't just a trend – it's a strategic move that enables developers to create better, more reliable, and scalable applications at a lower cost. The era of on-premise, hardware-heavy development is giving way to the agile, cost-effective, and scalable world of cloud computing. And with the ongoing advancements in cloud technology, this shift is likely to continue in the foreseeable future.
Les attributs: id, class, style, src et href
Tags: beginners, productivity
Published: 2023-07-21 08:34:25


Les attributs HTML sont utilisés pour enregistrer des informations supplémentaires sur les éléments dans une balise HTML. Ils se composent d’un nom et d’une valeur.

```
<balise attr = valeur>
```
Il existe plusieurs attributs en HTML. Nous allons quant à nous apprendre cinque d'entre eux, qui sont: `id`, `style `,`src`, `class`, `href
`

##1. L'attribut id
L'attribut universel id définit un identifiant qui doit être unique pour l'ensemble du document. Le but de cet attribut est de pouvoir identifier un élément lorsqu'on crée un lien, avec un fragment et qu'on souhaite le manipuler avec un script ou qu'on le met en forme avec CSS.
**ex:**

```html
<li><a href="https://example.com">Website</a></li>`

```

## 2. L'attribut class
L'attribut universel class indique une liste de classes associées à l'élément courant. Les classes permettent de manipuler les éléments, via CSS ou JavaScript en utilisant les sélecteurs de classe ou des fonctions telles que document.
ex:

```html
<p class="haut">

```

## 3. L'attribu style
 
L'élément `<style>` peut être inclus dans l'élément `<head> `ou dans l'élément `<body>` du document et les styles seront appliqués. Toutefois, il est recommandé de placer les styles dans l'élément `<head> `afin de clairement séparer la présentation du contenu autant que possible.
ex:

```html
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="style.css">
    <title>Document</title>
</head>

```

## 4. L'attribut src 
 L'attribut src contient donc l'adresse à laquelle on va chercher l'image (voir le chapitre Liens). On peut utiliser une adresse absolue ou relative. Il faut cependant proscrire l'inclusion des objets (images, sons, vidéo) situés sur d'autres sites, ce que l'on appelle des « liens à chaud » (hot links).
ex:

```html
<img src="https://assets.codepen.io/6093409/sprockt.svg" alt="Logo google png"/>

```

## 5. L'attribut herf 
L'élément HTML `<a> `(pour ancre ou anchor en anglais), avec son attribut href , crée un lien hypertexte vers des pages web, des fichiers, des adresses e-mail, des emplacements se trouvant dans la même page, ou tout ce qu'une URL peut adresser. Le contenu de chaque élément `<a>` doit indiquer la destination du lien.
ex:

```html
<p>
Rendez-vous quelque part sur la page :<br>
    <a href="index.html#cuisine">La cuisine</a><br>
    <a href="index.html#jardin">Le jardin</a><br>
    <a href="index.html#salon">Le salon</a><br>
</p>

```
Pour péciser un attribut, vous ferez d'abord un espace entre le nom de la balise et le nom de l'attribut, que vous écrirez en minuscule.
Manage your files in myFiles Alpha 1.2
Tags: tooling, news, programming, management
Published: 2023-07-21 08:30:29

Try myFiles ALPHA 1.2 for FREE in the link at the bottom of the post.

I continued my file manager and I added some new things to it:

![screen video](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xhrifrsj1hxrgle2cs09.gif)

- Move the cursor using the left click
- Unselected selected files
- Navigate in the content frame faster with Ctrl + Up/Down

Here's the download link:
https://blueberry077.itch.io/myfiles

If you have any feedbacks comment it in the post.

Thanks everyone :D
3 Steps to create a custom cursor with HTML, CSS and JavaScript
Tags: webdev, javascript, beginners, programming
Published: 2023-07-21 08:22:54

## Introduction
Have you ever come across a website with a unique and eye-catching cursor?

Custom cursors offer a brilliant opportunity to infuse your web projects with personality and interactivity. Implementing a custom cursor not only elevates the user experience but also serves as an expression of your brand’s personality.

In this blog, we will learn the steps of creating a custom cursor using HTML, CSS and JavaScript.

Let’s start!

## Set Up Your HTML File
Let’s create a basic HTML structure to start with.

```
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Custom Cursor</title>
</head>
<body>
    <!-- To create the cursor -->
    <div class="cursor"></div>
</body>
</html>
```

## Add CSS
Next, let’s add CSS to style the custom cursor.

```
body {
    cursor: none; /* Hide the default cursor */
}

.cursor {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: green; 
    border-radius: 50%; 
    pointer-events: none; /* Ensure the custom cursor doesn't interfere with content */
}
```

## Implement JavaScript
Now for the cursor to work with the user’s mouse movement, we have to implement JavaScript.

```
// Get the cursor
const cursor = document.querySelector(".cursor");

document.addEventListener("mousemove", function (e) {

cursor.style.left = e.clientX + "px";

cursor.style.top = e.clientY + "px";

});
```

## Putting It All Together

```
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Custom Cursor</title>
    <style>
      body {
        cursor: none; /* Hide the default cursor */
      }

      .cursor {
        position: absolute;
        top: 0;
        left: 0;
        width: 20px;
        height: 20px;
        background-color: green;
        border-radius: 50%;
        pointer-events: none; /* Ensure the custom cursor doesn't interfere with content */
      }
    </style>
  </head>
  <body>
    <!-- To create the cursor -->
    <div class="cursor"></div>
    <script>
      // Get the cursor
      const cursor = document.querySelector(".cursor");

      document.addEventListener("mousemove", function (e) {
        cursor.style.left = e.clientX + "px";

        cursor.style.top = e.clientY + "px";
      });
    </script>
  </body>
</html>
```
That’s it! Save your files and open the HTML file in your web browser. You should now see your custom cursor in action.

Thanks for reading.

For more content like this [click here](https://shefali.dev/blog/)!
<a href="https://www.buymeacoffee.com/devshefali" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>
#LearnedToday: Kevin Mitnick
Tags: learnedtoday, people, inspiring, hacker
Published: 2023-07-21 08:18:34

[Kevin Mitnick](https://it.wikipedia.org/wiki/Kevin_Mitnick) died a few days ago. 

📹  These days, you can find tons of article about him, but I want to remember him with this [video](https://www.youtube.com/watch?v=YmGwdoS706M) in which he talks about his first **hack**, at the age of 12.

💡 Okay, he did something illegal, but I found it really interesting how he was able to **think outside the box**.

🙇‍♂️ Our job is to **solve problems** all the time, very often just following **best practices** is enough, but sometimes you have to be **creative**.

💪  What I've learned over the years is that you always have to **ask questions**, **have doubts**, be **curious**; at the end of the day, you always **_learn_** something that maybe you can use in the future!

🐒  And then every once in a while it is good to remind ourselves that we are not just monkeys tapping keys on a keyboard! ❤️
Guide to Passing the PCNSE Exam: Everything You Need to Know
Published: 2023-07-21 08:18:34

[PCNSE Dumps](https://dumpsboss.com/paloalto-networks-exam/pcnse/) Make certain which you are the use of our Palo Alto Networks PCNSE dumps pdf exercise take a look at software program a couple of instances. If you aren't the use of our PCNSE examination dumps exercise take a look at software program a couple of instances and in all modes, then you definitely are creating a big mistake. If you're the use of the software program at exclusive instances and clearing a couple of exercise assessments, then you'll be capable of clean the Palo Alto Networks Certified Network Security Engineer PCNSE Version [PCNSE Exam Dumps](https://dumpsboss.com/paloalto-networks-exam/pcnse/) on the PCNSE Exam Dumps primary strive. We also are imparting assured fulfillment and after the use of PCNSE exercise examination questions, you'll be capable of clean the Palo Alto Networks PCNSE take a look at questions about the primary strive. More importantly, the software program can even come up with a clean concept of the way you could take a actual Palo Alto Networks Certified Network Security Engineer examination. It will assist you check your present day guidance degree so that you can enhance your guidance for the very last Palo Alto Networks PCNSE examination. Palo Alto Networks PCNSE PDF Exam Dumps | Free ninety Days Updates We also are imparting loose updates for PCNSE pdf examination dumps that we're imparting. 

Get Upto 60% Off >>>>>> https://dumpsboss.com/paloalto-networks-exam/pcnse/