teleren/devto huggingface dataset:
VS Code Pets，一邊寫程式一邊養隻療癒小寵物吧
Tags: beginners, plugins, vscode, pets
Published: 2023-02-01 13:49:45

## 本篇要解決的問題

看到「寵物」就知道，本篇要解決的問題就是我們人類的空虛心靈（咦？）。

開玩笑的 XD，前陣子滑新聞時，有瞄到「code」、「pet」的字眼，當時沒點進去看，只是有個印象。

在過完夢幻的十天年假後，第一篇文章不想太有壓力，想來點輕鬆的，就在 VS Code 上搜尋了「Pet」，排名第一的就是今天要介紹的「[VS Code Pets](https://marketplace.visualstudio.com/items?itemName=tonybaloney.vscode-pets)」。

![安裝數破 30 萬的 vscode-pets](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b1beutfme68xob2n8wy6.png)

用了一下後覺得蠻有趣的，開工後就一直讓幾隻小貓在 VS Code 上跑來跑去，也想分享給大家，於是整理了這篇使用筆記文。

---

## 安裝 vscode-pets

常用 VS Code 進行開發的攻城獅們，就不用看這段了，因為安裝延伸模組很簡單，但為了這篇可以湊一些字數就還是寫一下（有沒有這麼直接？）。

在 VS Code 上，點擊左側選單中的「延伸模組」：

![安裝 vscode-pets](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b46271l15qdhfcwt5k2a.png)

接著搜尋框中輸入「pet」，看到的第一個最多人安裝的就是了，按下「安裝」後不用幾秒就會安裝成功。

安裝成功，會看到原本寫「安裝」二個字的按鈕，變成停用、解除安裝。

![安裝成功](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgqe1a856tj0segbew38.png)

## 來放寵物吧

安裝完 vscode-pets，VS Code 左側選單點擊最上面的「檔案總管」，就會看到檔案清單的下方新增了一塊「VS CODE PETS」，而且預設會有一隻黑白貓在那邊跑來跑去：

![檔案總管會新增 VS CODE PETS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rt059ew3iru79kcph6qo.png)

區塊標題「VS CODE PETS」的右邊有三個按鈕：

- +：新增一隻寵物
- o：丟一顆球給寵物咬爛
- 垃圾桶：刪除一隻寵物

新增寵物時，會先選擇要新增什麼類型的寵物，目前有 10 種可以選擇：

![選擇寵物類型](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u0nr0fw1ilp5lelbp8kk.png)

因為 August 是貓派，所以就用 cat 來示範（我是貓派我驕傲）。

選好寵物後，有幾種類型的寵物可以選擇花色，像是貓咪就可以選擇：

![選擇寵物花色](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/etuhwhkallhq67qp6l62.png)

選好了花色，最後會需要幫寵物取名字，目的是之後要刪除時，會用寵物名字來選擇。如果是取名字障礙症候群的患者也不用擔心，預設會隨機提供一個名字：

![為寵物取名字，或是直接使用隨機名](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ohslbstdbp2e746vz6fp.png)

取完名字後，就會看到視窗中多了一隻可愛寵物啦~

![新增寵物成功](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s57nir11g5a4l37msz5w.png)

上面的截圖，寵物出現一個愛心 ❤ 的圖示，代表他們寵物之間認識了彼此。

滑鼠移到寵物身上，就會出現揮手 👋 的圖示，代表在跟奴才（不要懷疑就是在說你）打招呼：

![跟奴才打招呼](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jm8bicyrb3l4z3kaishe.png)

---

## 用指令看功能

不要被標題的「指令」二個字嚇傻了，其實就是我們要使用延伸功能時會按的：

- MacOS：`Cmd(⌘)` + `Shift` + `P`
- Windows / Linux：`Ctrl` + `Shift` + `P`

按下去以後，就可以輸入關鍵字來看延伸功能的更多功能，我們輸入：

```
pet coding
```

就會看到總共有以下功能可用：

![用指令可以有更多功能](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xwfgtnocegkvhdgxhpqb.png)

`Roll-call` 這個很好玩，就是所有的寵物會報數刷存在感：

![報數啦](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9xm2me8x3mrrh54egi2e.png)

---

## 用擴充設定改變場景

如果覺得寵物太小不夠安慰我們被廠商欺負的幼小心靈，可以透過擴充設定來改變。

VS Code 左側選單再選到延伸功能，一樣在 input 的框輸入 pet，接著點擊 vscode-pets 右下角的小齒輪圖，點擊「擴充設定」：

![進到 vsocde-pets 的擴充設定](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gffxabdgz0zs1ut1l83k.png)

點擊了以後，就可以看到 vscode-pets 的設定：

![vscode-pets 設定](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2qkgln0xjytpj7nivwr9.png)

`Pet size` 就是可以改變寵物大小的。

`Theme` 則是可以改變背景，目前有 none、forest、castle、beach 四種可選，選了以後就會看到愛寵們在不一樣的地方奔跑：

![可以換場景](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j4c5utk0mux33ex7bh37.png)

官方有提供說明文件，如果想了解更多可以點看 [文件](https://tonybaloney.github.io/vscode-pets/) 來看。

最後，不得不說，看看攻城獅的內心有寂寞，就算知道是假狗假貓也覺得開心跟被安慰 😂。
Introducing Rubberduck 1.0: AI Chat in Visual Studio Code
Tags: vscode, openai, opensource, javascript
Published: 2023-02-01 13:26:44

[Rubberduck](https://marketplace.visualstudio.com/items?itemName=Rubberduck.rubberduck-vscode) adds a chat interface to Visual Studio Code. You can edit code, get explanations, generate tests, and diagnose errors.

<video src="https://github.com/rubberduck-ai/rubberduck-vscode-asset/blob/main/screencast/2023-01-31-rubberduck-v1.mp4?raw=true" controls width="100%" height="auto" />

Rubberduck lets you use your own OpenAI API key and call the OpenAI API directly, so your code is only seen by you and OpenAI. Your API key is stored securely in the Visual Studio Code secret storage. The extension is [open source and available on GitHub](https://github.com/rubberduck-ai/rubberduck-vscode).

## AI Chat

Chat with Rubberduck about your code and software development topics. Rubberduck knows the editor selection at the time of conversation start.

![AI Chat](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c5q1ma8otc1fuoz53dqm.png)

## Edit Code

Change the selected code by instructing Rubberduck to create an edit. You can refine the diff by providing instructions in the chat interface.

![Edit Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0y6rgetcit6hm4fxpfzv.png)

## Explain Code

Ask Rubberduck to explain the selected code. Follow up with more questions in the chat interface.

![Explain Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tz9q2jgav6ia1dca6dtu.png)

## Generate Tests

Writing test boilerplate is tedious. Generate test cases with Rubberduck, refine them through chat, and get them 90% ready in less than 1 minute.

![Generate Tests](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/11c2394y1ix1nte80hnr.gif)

## Diagnose Errors

Let Rubberduck identify error causes and suggest fixes to fix compiler and linter errors faster.

![Diagnose Errors](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8x0sj4iehgj80afzqmuv.png)

## Project

Rubberduck is open source and being developed in public!

You can find out more here:

* Visual Studio Code Marketplace: [Rubberduck.rubberduck-vscode](https://marketplace.visualstudio.com/items?itemName=Rubberduck.rubberduck-vscode)
* Github: [github.com/rubberduck-ai/rubberduck-vscode](https://github.com/rubberduck-ai/rubberduck-vscode)
* Discord: [discord.gg/8KN2HmyZmn](https://discord.gg/8KN2HmyZmn)
Redis University RU102N: Redis for .NET Developers
Tags: redis, dotnet, csharp, database
Published: 2023-02-01 13:16:05

Hello all! I wanted to share the culmination of something I've been working on the last few months, and realistically have been concocting since I metaphorically stepped through the doors at Redis as its .NET Advocate in June of 2021. I've just released the new [RU102N: Redis for .NET Developers](https://university.redis.com/courses/ru102n/) course in Redis University.

Redis University is a free, online learning platform that's intended to teach you everything you need to know about Redis.

## What You'll Learn

* The best practices for using the Redis client [StackExchange.Redis](https://github.com/stackexchange/stackexchange.redis)
*  How to do all the normal Redis things (data structures, streams, pipelining, pub/sub, transactions).
* How to interact with Redis from ASP.NET (both core and classic), and deploy some of the most common use-cases of Redis in these environments.
* How to interact with Redis Stack from .NET. Both directly from the StackExchange.Redis ad-hoc API, as well as the third-party ecosystem that's sprung up around it.
* How to index, store, query, and aggregate your objects in Redis using Redis OM .NET

## How You'll Learn

The course is run through Redis University's Learning Management System(LMS), and is chock full of code examples that you can use to learn by doing. At the end of the course there's an assessment to see what you've learned. If you pass the assessment you'll be awarded a certificate for the course. You can also interact with me and other learners in our course [Discord Channel](https://discord.com/channels/697882427875393627/1043260639730208781) on Redis's Discord server. The course is slated for "6 weeks" for about 3 hours per week, but it is mostly self paced (we do turn the courses over ever 6 weeks so just finish on time!) You could realistically sit down with the materials for a few days and come away with a strong knowledge of how to use Redis from .NET.

## Special Thanks

* I want to give a big shout out [Simon Prickett](https://twitter.com/simon_prickett) who was my second set of eyes on the course, and who helped me navigate our LMS.
* Also a huge thanks to Marc Gravell and Nick Craver, who are the maintainers of StackExchange.Redis, and without whom this course literally would not be possible.
* Naturally, a huge thanks to those .NET users of Redis who's collective knowledge and experience I've sought to condense and synthesize into this course.

## Course Resources

* The course itself is in [Redis University](https://university.redis.com/courses/ru102n/)
* The course's [GitHub Repo](https://github.com/redislabs-training/ru102n)
* If you are not familiar with Redis, [RU101](https://university.redis.com/courses/ru101/) covers everything you'd need to know from Redis' perspective prior to starting the course.

Happy learning! Tell your friends!
How Returns Management Software Can Help Businesses to Improved Customer Satisfaction
Published: 2023-02-01 13:13:17

Returns management software is a powerful tool that can help businesses to improve customer satisfaction and loyalty. This software provides businesses with the ability to manage returns more efficiently, reducing the time and effort required to process them. It also enables businesses to quickly identify any areas of improvement that can lead to higher customer satisfaction. In this article, we will discuss how returns management software helps businesses grow and improve consumer satisfaction and loyalty by streamlining the returns process and providing valuable insights.

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

Saara [returns management software](https://saara.io/) has revolutionized the way businesses handle customer returns. By facilitating the process for both customers and businesses, returns management software has made it easier for customers to return their products and for businesses to make sure customers are pleased with the process. Additionally, the software offers businesses the opportunity to gain valuable insights into customer behaviours and preferences, allowing businesses to address any customer concerns quickly and effectively. The software also helps businesses to proactively address potential customer issues, ultimately improving the overall customer experience and ensuring customer fulfilment.

Saara [ecommerce automation software ](https://saara.io/automated-ecommerce)can significantly improve customer satisfaction by streamlining the entire returns process. Businesses can automate their entire return experience, from creating return labels to providing real-time updates to customers. Additionally, returns management software can help businesses track every return, capture data, and use analytics to optimize their return process. Having better visibility into return trends can also help businesses make informed decisions that can lead to more efficient returns which in turn can positively impact customer satisfaction.

In conclusion, returns management software is an essential tool for businesses that are looking to increase customer satisfaction. Not only does it help streamline the entire process of returns, but it also provides businesses with the data and analytics they need to make informed decisions. With a good returns management strategy, businesses can provide customers with a quick and efficient returns experience which can lead to greater customer satisfaction.

For more information visit our website: https://saara.io/
AWS TRAINING & CERTIFICATION - GET AWS Certified: Professional Challenge 2023
Tags: aws, getcertified, challenge, 2023
Published: 2023-02-01 12:47:55

Join the **Get AWS Certified: Professional Challenge**
-



![AWS exams 01](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3jeuqbwemyussm1523kf.png)






Uplevel your cloud skills and show what you know—gain access to AWS Professional Certification exam prep, receive a 50% discount voucher for your AWS Certification exam and get AWS Certified!
The promotion is currently active until April 28, 2023.

AWS Skillbuilder exams preparation courses for this challenge
[AWS Certified Solutions Architect – Professional ](https://aws.amazon.com/certification/certified-solutions-architect-professional/)or 
[AWS Certified DevOps Engineer - Professional](https://aws.amazon.com/certification/certified-devops-engineer-professional/)


**Register Now**:
[AWS Certified: Professional Challenge](https://pages.awscloud.com/GLOBAL-ln-GC-TrainCert-Professional-Certification-Challenge-Registration-2023.html)
what is a React Hooks?
Tags: react, javascript, tutorial, beginners
Published: 2023-02-01 12:44:59

Hooks were added to React in version 16.8.

Hooks Only allow function components to have access to state and other React features. Because Class Component No longer Needed 

The Hook generally replace class components, there are no plans to remove classes from React.

## Hook Rules

There Are three Rules -

1. Hooks only can called inside the React function component

2.Hooks only can called Top of the component 

3.Hooks can not be conditional

## Example-
Here you must **import** Hook from **React**.
Here we are using the **useState **Hook to keep track of the application state.

```
import React, { useState } from "react";
import ReactDOM from "react-dom/client";

function FavoriteColor() {
  const [color, setColor] = useState("red");
    
  return (
    <>
      <h1>My favorite color is {color}!</h1>
      <button
        type="button"
        onClick={() => setColor("blue")}
      >Blue</button>
      <button
        type="button"
        onClick={() => setColor("red")}
      >Red</button>
      <button
        type="button"
        onClick={() => setColor("pink")}
      >Pink</button>
      <button
        type="button"
        onClick={() => setColor("green")}
      >Green</button>
    </>
  );
}

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<FavoriteColor />);
```

I hope You Like the Article ♥
If you like the Article So follow me 😍

Thank you 
Shivani Frontend Developer
Move files from SSH server to S3 bucket
Tags: s3, aws, ssh, learning
Published: 2023-02-01 12:08:31

Hello, devs

This blog going to explain the steps to move files or folders from the SSH server ( **where AWS credentials are not configured** ) to the AWS S3 bucket easily without missing any files or folders.

I was working on moving away from a legacy server to S3 bucket hosting for static file hosting. Being legacy there was many files and folder was there and the legacy server was not having AWS access enabled. Due to the limitation of storage cannot run the zip command to compress and download files. Later those files and folders have to move to the S3 bucket.

While googling found good solutions to tackle this problem.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675250168362/cba008e3-e9e4-438b-96c7-cfdc24e8bbc1.gif)

### Let's follow below steps:

Considering you have access to the SSH server and S3 bucket AWS credentials.

1. Need to use `rsync` command. There is `SCP` the command is also available but if the internet interrupts you have to start again. And FileZilla took more time than the terminal command. `sshdirectorypath` will be SSH server directory from where you have to get files and folders and it will do all recursively. Same `/localmachine/directory/` your local machine directory.
    

```bash
> rsync -avz -e ssh username@hostname:/sshdirectorypath/ /localmachine/directory/
receiving file list ... done
```

1. If the SSH server is already enabled AWS credentials like secrete key and access key under `~/.aws/credential` then can skip the first step.
    
2. Running command to copy the local backup to the S3 bucket.
    

```bash
s3 cp ./ s3://bucketname/ --recursive
or if you have to select specific folder inside bucket then 
s3 cp ./ s3://bucketname/folder/folder --recursive
```

### Benefits of using `rsync` command:

* is no data leakage will happen
    
* even if the internet interruption will resume where it last stop
    
* faster and it lists the first contents and copies.
    

I hope this blog helps you to learn. Feel free to reach out to me on my Twitter handle [@AvinashDalvi_](@AvinashDalvi_) or comment on the blog.

Keep learning and keep sharing!

### References :

* [https://www.geeksforgeeks.org/rsync-command-in-linux-with-examples/](https://www.geeksforgeeks.org/rsync-command-in-linux-with-examples/)
    
* [https://serverfault.com/a/350557](https://serverfault.com/a/350557)
Wednesday Links - Edition 2023-02-01
Tags: java, jvm, gradle, maven
Published: 2023-02-01 12:08:19

Java 21: Performance Improvements Revealed (6 min)📈
https://minborgsjavapot.blogspot.com/2023/01/java-21-performance-improvements.html

Microservices Patterns with Spring Integration (1 min)🦓
https://github.com/artembilan/microservices-patterns-spring-integration

Generational ZGC (30 sec)👴
https://twitter.com/BriceDutheil/status/1618291538601349123

Protecting Project Integrity (3 min)🛡️
https://blog.gradle.org/project-integrity

Adventures in Maven Dependency Conflict Resolution (1 min)🤠
https://joshlong.com/jl/blogpost/check-your-maven-builds-parent.html

Useful & Unknown Java Libraries (10 min)🔎
https://piotrminkowski.com/2023/01/30/useful-unknown-java-libraries

Measuring compact strings memory savings (6 min)📐
https://www.javaspecialists.eu/archive/Issue306-Measuring-compact-strings-memory-savings.html
Cap XX: La era del emprendimiento, El libro negro del programador. 💻
Tags: spanish, productivity, programming, books
Published: 2023-02-01 12:00:00

## **La era del emprendimiento**

* Construiur una marca personal y crear así una buena reputación es importante hoy en día.

* Con el tiempo las profesiones mueren o se reiventan.

* Con esto también aparecen nuevos trabajos y puestos que necesitan ser cubiertos. Ve la oportunidad.

* No es necesario tener una infraestructura de la mejor para poder hacernos visibles en internet.

* La economía va cambiando, hay bajones últimamente, pero como desarrolladores más que sufrir esto, somos parte del cambio.

---

Te dejo el link gratuito de [*El libro negro de programador*](https://underpost.net/ir/pdf/cy3/el-libro-negro-del-programador.pdf) por si te intesa leerlo, o dale click a la imagen:


[![libro](https://www.digitalskillsinstitute.com/assets/media/books/5541eba31b4b42b5bb021dc77c70d658-480.jpg)](https://underpost.net/ir/pdf/cy3/el-libro-negro-del-programador.pdf)
How to change the default route params from ;= to / in angular 14.
Tags: angular, angular14
Published: 2023-02-01 12:05:45

In angular 9, I used to change the default route params in the of the below mentioned path
@angular -> router -> _ivy_ngcc_ -> fesm2015 -> router.js -> serializeMatrixParams(method).

Please guide me how to change in angular 14.
How to test Vue 3 components with Jest?
Tags: webdev, javascript, vue, jest
Published: 2023-02-01 12:03:56

Testing is crucial to ensure that our code is working as expected and maintaining the stability of the application. 

When working with Vue.js or any other js framework, Jest is an excellent choice for testing your components.

In this blog post, we will see how to set up your environment, write tests for different types of components, and share best practices for writing clean and maintainable tests using Jest and Vue 3.

Here's the outline of the post.

1. Why component testing?
2. What to test in component test?
3. Required packages
4. Setting up the environment
5. Writing our first test
6. Testing different types of components
7. Handling non-javascript assets
8. Best practices

By the end, you will have a solid understanding of how to test your Vue components using Jest.

For detailed implementation, check out [canopas blog](https://blog.canopas.com/vue-3-component-testing-with-jest-8b80a8a8946b).
Benefits of time-based indices on reindex, alias, ilm
Tags: elasticsearch, reindex, ilm
Published: 2023-02-01 11:58:31

In addition to the benefits listed [here](https://dev.to/sandeepkanabar/sizing-shards-using-time-based-indices-1ebl), using time-based indices helps in the following:

1. [Avoids having to reindex entire data](#point-1)
2. [Efficient Deletion and application of ILM](#point-2)
3. [Easy to include / exclude indices based on alias](#point-3)

##### 1. Avoids having to [reindex] (https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) entire data <a name="point-1"></a>
If the data influx increases, we could easily set `"number_of_shards": 3` in the [index template] (https://www.elastic.co/guide/en/elasticsearch/reference/current/index-templates.html) and this would get effected for `tomorrow's` day-wise index. Without the need to reindex any data, the number of shards could be easily changed.

##### 2. Efficient Deletion and application of ILM <a name="point-2"></a>
Let's say we need to retain data upto 90 days. Thus, for a day-wise index which is `older than 90 days`, that [entire index](https://www.elastic.co/guide/en/elasticsearch/reference/current/size-your-shards.html#delete-indices-not-documents) can be purged / deleted. This is far more efficient than purging older records from indices which makes them pretty un-optimised from search perspective.
Also, [index lifecycle management]  (https://www.elastic.co/guide/en/elasticsearch/reference/current/set-up-lifecycle-policy.html) becomes simplified with time-based indices.

##### 3. Easy to include / exclude indices based on alias <a name="point-3"></a>
Let's assume the cluster needs to retain 90 days data but needs to search only on the `last 60 days` data. **Alias** to the rescue. In this case, define an [alias] (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html) in index template that gets mapped to newly created day-wise indices. As soon as a past index becomes older than 60 days, the alias is removed from that index. This ensures that at any given point of time, the alias will point to a maximum of 60 day-wise indices.
The Best Mobile Phone 2022
Tags: best, mobilephone, bestshop, iphone13
Published: 2023-02-01 11:53:31

## The use of a mobile phone
The mobile phone has become a major part of our lives and it’s no wonder why. With all the new technologies and means of communication available to the new generation, mobile phones have become an essential tool for staying connected, staying productive, and helping streamline everyday tasks. Whether you are a business professional or a student, having access to your mobile phone for everyday tasks can provide numerous benefits. From keeping in touch with friends and family to managing finances and organizing schedules, using your phone can help you stay on top of tasks while also reducing stress levels.

## What is best mobile phone ?
[The iPhone 13 Professional Max, 128GB](https://www.amazon.com/dp/B0BGYG5GSJ?tag=kodzo47-20&th=1)
With more and more people looking for the best mobile phone to buy in 2022, it is important to be well-informed about the latest trends in technology. The best mobile phone of 2022 must have the right features, such as a powerful processor, long battery life, great camera quality, and so on. Additionally, it should also be easy to purchase online with a reliable delivery service. In this article, we will take a look at some of the best mobile phones that are expected to be launched in 2022 and provide some useful tips for finding the perfect one for you.
Say hello to the biggest, most powerful iPhone ever. 

## [The iPhone 13 Pro](https://www.amazon.com/dp/B0BGYG5GSJ?tag=kodzo47-20&th=1)
 Max combines cutting-edge technology with an intuitive user experience for an incredibly powerful smartphone. Get up to 17 hours of battery life, 128GB of storage, and a stunning Sierra Blue finish. Plus, it’s unlocked so you can use it on any network!