teleren/devto huggingface dataset:
Vim/Neovim: Sort & Unique
Tags: vim, neovim, tips, sort
Published: 2021-05-18 11:54:07

---
title: Vim/Neovim: Sort & Unique
published: true
description: Vim / Neovim enables us to manipulate text in various ways, in which we can sort lines or make them unique. Here are the examples.
tags: vim, neovim, tips, sort
series: Vim/Neovim Tips
---

[Vim](https://www.vim.org/) / [Neovim](https://neovim.io/) enables us to manipulate text in various ways, in which, for example, we can sort lines or make them unique. Here are the examples.

---

## Sort

Use `sort` command.
Besides, here is the documentation of [Vim](https://www.vim.org/scripts/script.php?script_id=4958) / [Neovim](https://neovim.io/doc/user/change.html#sorting).

### Specify sort __order__

#### 1. ASC

By default.

```vim
:%sort
```

#### 2. DESC

Append `!`.

```vim
:%sort!
```
    
#### 3. Numeric sort

Give `n` as a parameter.

```vim
:%sort n
```

![operation image](https://dev-to-uploads.s3.amazonaws.com/i/xc7q8s75mce8pfv0zqvv.gif)

<center>Fig.1 Sort order</center>

### Specify sort __range__

#### 1. Whole text

Use `%` as usual.

```vim
:%sort
```

#### 2. Specific lines only

Add `startNum,endNum` to the head.
2-5 lines only, for example:

```vim
:2,5sort
```

#### 3. Visual selection

As is.

```vim
:'<, '>sort
```

![operation image](https://dev-to-uploads.s3.amazonaws.com/i/mngdi6ik2pk0ig0br50k.gif)

<center>Fig.2 Sort range</center>

### An example of order + range (combination)

Here is a DESC + numeric sort example.

```vim
:%sort! n
```

![operation image](https://dev-to-uploads.s3.amazonaws.com/i/oj3jmaxx4ucye534woyo.gif)

<center>Fig.3 Complex example</center>

---

## Make lines __unique__

Use `sort` command as well. Give it `u` as a parameter.

```vim
:%sort u
```

![operation image](https://dev-to-uploads.s3.amazonaws.com/i/w0c28jd7tc8682jrfiu5.gif)

<center>Fig.4 Unique</center>
Adding a layer of more explicit typings on top of 3rd party library interfaces
Tags: typescript
Published: 2021-05-18 11:39:40


You may have noticed that the typing provided by 3rd party libraries often feels very loose. This should not come as a surprise as to maintain flexibility for all users it is not always possible to provide stricter typings.

However, there is nothing to stop us, within our own applications, adding a layer of more explicit typing on top of the library interface. In doing so we can leverage Typescript to greatly improve the developer experience, as well as encouraging consistently in how the library is used.

To demonstrate the benefits of this approach we will work through two use cases.

1. Adding type safety to AG Grid column types.
1. Generating type safe custom builders for the Angular Formly library.

With both of these scenarios we will show how adding an additional level of explicit types prevents bugs and speeds up development.

Continue reading at [indepth.dev](https://indepth.dev/posts/1460/adding-a-layer-of-more-explicit-typings-on-top-of-3rd-party-library-interfaces).

[![inDepth.dev](https://images.indepth.dev/images/2021/05/Layering-Types-onto-Third-Party-Libraries.png)](https://indepth.dev/posts/1460/adding-a-layer-of-more-explicit-typings-on-top-of-3rd-party-library-interfaces)
MariaDB – How to use Spring JPA MariaDB by Spring Boot
Tags: mariadb, springjpa, springboot
Published: 2021-05-18 11:39:17

https://grokonez.com/spring-framework/spring-data/use-spring-jpa-mariadb-spring-boot

MariaDB – How to use Spring JPA MariaDB by Spring Boot

In tradition approach, implementing Data Access Layer makes lots of boilerplate code. <strong>Spring JPA</strong> is a part of Spring Data, helps us improve our codes and reduce efforts for development and maintenance. <a href="https://grokonez.com/tag/spring-jpa">Spring JPA</a> supports us the ways to write interface for repositories and custom finder methods, the implementation will be done automatically by Spring Framework. 
About <strong>MariaDB</strong>, it is an open source leader,  provides the solutions to run on all infrastructure. 

So in the tutorial, <a href="https://grokonez.com/">JavaSampleApproach</a> shows you how to create <strong>Spring JPA MariaDB</strong> application using Spring Boot.

Related posts:
- <a href="https://grokonez.com/spring-framework/spring-boot/use-spring-jpa-postgresql-spring-boot">How to use Spring JPA with PostgreSQL | Spring Boot</a>
- <a href="https://grokonez.com/spring-framework/spring-boot/use-spring-jpa-mysql-spring-boot">How to use Spring JPA MySQL | Spring Boot</a>

<!--more-->
<h2>I. Technology</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.6RELEASE
- MariaDB 10.2.7
<h2>II. Overview</h2>
<h3>1. Goal</h3>
<img src="https://grokonez.com/wp-content/uploads/2017/08/spring-boot-spring-jpa-mariadb-architecture.png" alt="spring boot spring jpa - mariadb - architecture" width="673" height="315" class="alignnone size-full wp-image-7324" />
<h3>2. Project Structure</h3>
<img src="https://grokonez.com/wp-content/uploads/2017/08/spring-jpa-mariadb-project-structure.png" alt="spring jpa mariadb - project structure" width="351" height="280" class="alignnone size-full wp-image-7325" />
<h3>3. Step to do</h3>
– Create Spring Boot project
– Create DataModel Class
– Create Spring JPA Repository Interface
– Create Web Controller
– Deployment
<h2>III. Practice</h2>
<h3>1. Create Spring Boot project</h3>
Open <strong>Spring Tool Suite</strong>, on Menu, choose <strong>File</strong> -> <strong>New</strong> -> <strong>Spring Starter Project</strong>, then input project’s info. Press <strong>Next</strong> then <strong>Finish</strong>, a Spring Boot project will be created successfully.

Open <strong>pom.xml</strong>, add needed dependencies: <strong>Spring JPA</strong>, <strong>Web</strong>, <strong>Mariadb Client</strong>:

More at:

https://grokonez.com/spring-framework/spring-data/use-spring-jpa-mariadb-spring-boot

MariaDB – How to use Spring JPA MariaDB by Spring Boot
UI Dev Newsletter #57
Tags: webdev, html, css, javascript
Published: 2021-05-18 11:39:13

- [Optimizing Web Vitals using Lighthouse](https://bit.ly/3hwu05T)
Addy Osmani covers new tooling in Lighthouse, PageSpeed, and DevTools to help identify how your site can improve on the Web Vitals.


- [Container Queries in Web Components](https://bit.ly/3ootjNv)
Max Böck explores Container Queries and shares the process of creating a book store demo.


- [Component-level art direction with CSS Container Queries](https://bit.ly/2SRMVxP)
Sara Soueidan explores the possibilities of Container Queries by taking a closer look into a classic card component.


- [Toggling CSS Custom Properties with Radio Buttons](https://bit.ly/33N6vNR)
Michelle Barker shares why CSS Variables are great for toggling between different values using radio buttons.


- [What I Learned by Relearning HTML](https://bit.ly/2Rsrlzz)
Danny Guo shares his positive experience while relearning HTML by taking a beginners course and reading the MDN documentation for HTML.


- [🧠 Psychology of Design: 101 Cognitive Biases &amp; Principles That Affect Your UX](https://bit.ly/3tV4Osz)
A complete list of cognitive biases and design principles. Tons of product examples, tips, and checklists to improve your user experience.


- [Web Development for Beginners - A Curriculum](https://bit.ly/3eQftjV)
Microsoft offers a 12-week, 24-lesson curriculum all about JavaScript, CSS, and HTML basics.


- [Glassmorphism CSS Generator](https://bit.ly/3yhtb7e)
Marko Denic creates a helpful tool for generating appealing glass effects with CSS only.



Happy coding!

[Subscribe to the newsletter here!](https://bit.ly/34155z3)
Use OVH API in Ruby
Tags: ruby, api, ovh
Published: 2021-05-18 11:30:45

*If you're searching to quickly copy&paste some code to use OVH's API in Ruby... welcome my friend. 
This post is for you. If not, you may not be interested.*

## Introduction

Lately I struggled to use OVH's API on a Ruby because there isn't any official wrapper made for Ruby.

So I followed [OVH's tutorial](https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/) to make a call to their API, and translated it in a simple Ruby script.


## Step 1: Create your script keys

Fill the informations on [this page](https://api.ovh.com/createToken/) to create your script credentials. 

## Step 2: Write the Ruby script

Create a file called *app.rb* for example, and put the code below : 
```ruby
require 'httparty'
require 'digest/sha1'

# CREDENTIALS
APPLICATION_KEY = "hDSISKsDSKdSOHIs" # Fill it with your own key
APPLICATION_SECRET = "hHkNkGHkGuyFliuHGIUGiohmoiHHIUGh" # Fill it with your own key
CONSUMER_KEY = "hIOHoiNkhIgfOYUmpioGPIuhihujIMUG" # Fill it with your own key

BASE_URL = "https://eu.api.ovh.com/1.0"
QUERY = BASE_URL + "/telephony/aliases"

######## STEP 1: CREATE SIGNATURE ########

METHOD = "GET"
QUERY = "https://eu.api.ovh.com/1.0/telephony/aliases"
BODY = ""
TSTAMP = HTTParty.get("https://eu.api.ovh.com/1.0/auth/time").to_s
SIGNATURE = "$1$" + Digest::SHA1.hexdigest(APPLICATION_SECRET + "+" + CONSUMER_KEY + "+" + METHOD + "+" + QUERY + "+" + BODY + "+" + TSTAMP)

######## STEP 2: GET TELEPHONY ALIASES (e.g) ########

options = {
  "headers": {
    "X-Ovh-Application": APPLICATION_KEY,
    "X-Ovh-Consumer": CONSUMER_KEY,
    "X-Ovh-Signature": SIGNATURE,
    "X-Ovh-Timestamp": TSTAMP,
  }
}

aliases = HTTParty.get(BASE_URL + QUERY, options)
puts aliases

```

Then run :

```bash
> ruby app.rb
```

And you should see something like :

```
[
    "xxxxxxxxxx",
    "xxxxxxxxxx",
    "xxxxxxxxxx",
    ...
  ]
```
Roblox Developing
Tags: design, architecture, beginners, codenewbie
Published: 2021-05-18 11:29:52

Roblox developing is now one of the easiest ways to earn money by putting in effort but with low risk! All that really needs to happen is imagination. 

**Reasons why roblox developing is low risk**
1. Roblox is an online platform where there is no reason to spend money at all
2. The code of conduct is easy to follow and there are some great websites to help you 
3. DevEx or cashing out with money is easy and very efficient 

**What to watch out for in roblox developing**
1. Many of the users online will scam you so always take payment before you submit the build or code. (I send screenshots then ask for pay)
2. I think 360 robux=$1 which is quite manageable
3. You might want to have other platforms with your user so you can get an audience, this is a great way to form a fanbase and make money with youTube

**What skills do I need?**
1. You need to be able to 3D model. Roblox Studio (where you make the games) has a great interface design that can help you. Another way is to make a file in blender and export it to Roblox Studio. 
2. Basic coding, Roblox coding is different from other coding but it's easier to understand a new code when you can code a little
3. Time, Roblox is a platform where developers spend up to a year creating 1 game. You will have to provide updates regularly.
4. Communications skills, If you wish to develop you should probably get a team together of expert 3D modelers, Scripters, GFX creators. If you can do them all then go solo! 

Many of the developers on Roblox have made millions of $$$ join today at roblox.com, make an account, click create, download the studio and boom you can create games. The interface is easy to figure out but you might want to watch some videos to get started! 

I have my own, "Roblox Devs" orginazation that you can be sure to reach out on

Twitter: @mit_pit 
Roblox: @littlePitMit_Dev
DevTo @mit_pit 

Message me with any questions, concerns, comments, or other

You can also write a reply below. 

Have a great day DEV.To community I know that was a lot to read!
Installing RStudio on MacOS and Windows
Tags: r, rstudio, mac
Published: 2021-05-18 11:20:35

Initially install R from the following link:

https://cran.r-project.org/
Then choose your desired Operating System.

Since, the above application is not visibly pleasable download R Studio from the following link:

https://www.rstudio.com/
Then navigate to Products -> Choose RStudio -> RStudio Desktop -> Download RStudio Desktop for your desired Operating System.
Multiple line array functions without 'return' 
Published: 2021-05-18 11:16:40

---
title: Multiple line array functions without 'return' 
published: true
description: What to do when lintern tells you that the line is too long, but you only have one line of code to return.
tags: 
//cover_image: https://direct_url_to_image.jpg
---

What to do when lintern tells you that the line is too long, but you only have one line of code to return.

## Problem:

So I have a line of code:

```
const  someLongName = aLotOfstuff.filter(longStuff  =>  longStuff.longField === 'some very long string);
```
Linter warns me that this line is longer than it should be, so I need to break it up somehow. I could go with thee return route:

```
const  someLongName = aLotOfstuff.filter(longStuff  =>  {
	return longStuff.longField === 'some very long string);
});
```
but that's not nice is it? I want to avoid using the unnecessary 'return'.
## Solution:
So how can I do that? Youn can just use brackets:

```
const  someLongName = aLotOfstuff.filter(longStuff  =>  (
	longStuff.longField === 'some very long string);
));
```
The Go Playground - standard input
Tags: go
Published: 2021-05-18 11:15:42

📌 When you use The Go Playground, you cannot make interactive programs like this one because it does not allow the input of values by standard input interactively:
https://play.golang.org/p/lvkXx7aB-XV

the program will terminate and will not allow you to enter any value.

📌 Go playground can write on standard output and standard error. Anyway can still receive a value from standard input not interactively.
https://play.golang.org/p/r-uvWSb8UiV

📌 it operates on an in-memory file system, which will allow assigning a value that stores it in memory as standard input. https://github.com/orbs-network/go-nacl-experiment

📝 Playground documentation: Inside the Go Playground https://blog.golang.org/playground
Typescript and React, my experience
Published: 2021-05-18 11:11:58

I recently just started learning Typescript so I thought I'd share my experience so far. I'm not going to focus too much on what typescript is and its features because I feel there are already so many helpful articles out there. Instead, I want to focus on my experience and maybe that will help you decide if it's a language you should learn.

Typescript is a superset of Javascript which just means if you look under the hood, you'll find Javascript. This is great especially if you're looking to migrate to it. Two things I really enjoyed about Typescript are types and interfaces. 

The :Type annotation allows us to specify the type after the variable name, basically this just means stating if it's a string, number, boolean etc. This is great because it allows the compiler to check at runtime for bugs. Interfaces can be used to specify the type and they allow us to guarantee that an object will contain specific fields however using ? after the property name makes it optional.

One thing I really loved about Typescript was its familiarity. Working with it reminded me of Kotlin. Some of its syntax and its simplicity really reminded me of kotlin which I appreciated. It was fairly simple to understand the basics however things did become slightly harder once I needed to make an API call.

I really struggled when I had to destructure the data that came from the API because typescript wouldn't allow me to retrieve the data. After bashing my head against the wall, I finally realised that any data I needed to destructure I would have to provide a type for. I ended up with a lot of types however I didn't need to declare a type for all the data returned by the API. I only needed to declare a type for the data I needed to retrieve from the API. Trying to retrieve data I didn't create a type for resulted in errors.

I obviously have just scratched the surface when it comes to Typescript but I'm really enjoying it. I plan on adding firebase to my project so I might come back with another article about that experience. For now, I'm convinced and 
I will probably be using it a lot more often.
The long winding road to Kubernetes...
Tags: kubernetes, docker, devops, dev
Published: 2021-05-18 11:09:23

A look at why enterprises are slow in moving to Kubernetes.

With the advent of the microservices architecture, containers have emerged as the tool of choice for building and deploying applications. Enterprises are rapidly adopting containers as that enables them to scale on-demand. But when it comes to deploying a bulk-load of applications, container orchestration and management becomes a tough nut to crack. Click to know more...
software containers to accelerate app delivery
Tags: kubernetes, docker, devops
Published: 2021-05-18 11:07:19

Containers have been the talk of the software development world for a few years now. At present, over 26% of environments currently use containerized applications and the number is expected to double by 2021. The key appealing factor that containers bring to the table is offering quality software delivery within a comparatively short time span. Containers have played a major role in transforming the app delivery process. Click to know more...
What Are The Various Guest Blogging Challenges You Can Undergo? - eGoodMedia
Published: 2021-05-18 10:34:59

As of now, we have discussed the meaning of referral traffic and how many different ways you can draw your referral traffic through various channels including guest blogging. But is it going to be that simple? With guest blogging, absolutely not. Guest blogging includes different characters & chapters of one story. There are villains, companions, a hero, and a heroine of course. There’s a goal to accomplish as well. Let’s throw light on the leading guest blogging challenges that SEO professionals often face:

<a href="https://www.egoodmedia.com/guest-posting-is-it-a-trustworthy-link-building-strategy/">Read more</a>

Read more Articles:-

<a href="https://www.egoodmedia.com/real-estate-website-seo-guide-improve-your-online-presence-with-result-driven-tips/">Real Estate Website SEO Guide: Improve Your Online Presence With Result Driven Tips</a>
<a href="https://www.egoodmedia.com/how-to-implement-social-media-attribution-models/">How To Implement Social Media Attribution Models?</a>

Contact Details:-
1-6046704333
422 Richards St Unit 170, Vancouver, BC V6B 2Z4, Canada

<a href="https://www.egoodmedia.com/">Website Design Seattle Company</a>

Visit Reference Profile Websites:-
https://bit.ly/3uWi6pS
https://bit.ly/3ynjXpN
https://bit.ly/33TIwwM
https://bit.ly/3fo7zxm
https://bit.ly/3tTNQut
<a href="https://www.egoodmedia.com/how-social-media-engagement-has-changed-during-covid19/">covid-19 Social media engagement</a>
https://bit.ly/3tXCUfe
https://bit.ly/3oshkP5
https://bit.ly/33UXZfP
https://bit.ly/3ydZ3JT
https://bit.ly/3yhMopb
<a href="https://www.egoodmedia.com/reddit-marketing-scale-your-business-using-reddit-in-2020/">reddit marketing</a>
https://bit.ly/3uT5eB3
https://bit.ly/3eSvDcr
https://bit.ly/2SRlAfb
https://bit.ly/3ouPnGs
<a href="https://www.egoodmedia.com/google-image-search-to-drive-organic-traffic-on-your-website-in-2020/">Google image search drive traffic</a>
https://bit.ly/33Fs3vW
https://bit.ly/3w7yjsK
https://on.nyc.gov/3tMmLJR
https://bit.ly/3oe5lEN
https://bit.ly/3uX0QB5
https://bit.ly/3bsKoRj
https://bit.ly/33IjYa0
https://bit.ly/3tS86Ni
https://bit.ly/3htvlKO
My Favourite Podcasts
Published: 2021-05-18 06:15:16

Have you ever wanted to listen to a podcast but don’t know what to listen to ? Here’s a list of my favourite podcasts on Spotify .


## 1) Open Source Security Podcast 
- by Josh Bressers and Kurt Seifried 


![e8ac58d4e140235174ee8912c1fea02bf0bbc27b](https://user-images.githubusercontent.com/58665834/118588327-ccf04d80-b7bb-11eb-80d5-d7b6f8c60abd.jpeg)

If you’re working or studying in the field of  Open Source security or if you’re curious or even just want to stay up to date with tech related stuff this podcast is the one for you . The Podcast covers a range of topics and they have [show notes](https://opensourcesecurity.io/category/podcast/) for each of their podcasts so you can dive deeper in the topics that they cover . The duration of the podcast is varies from 29-40 mins. 


### 2) Simplypodlogical 

- by Simply Nailogical

![SimplyPodLogical_SquareBanner](https://user-images.githubusercontent.com/58665834/118597517-6888ba80-b7ca-11eb-8421-d94806333283.jpg)

If you want to listen to a podcast covering various general topics . Simplypodlogical is the podcast for you . It covers various topics from colleges to relationships to cancel culture . The duration of the podcast varies from 40-90 mins . 


### 3) Think Fast , Talk Smart Podcast 

- by Stanford GSD 


![1200x1200bb](https://user-images.githubusercontent.com/58665834/118598247-65da9500-b7cb-11eb-943a-52323c4ddf0b.jpg)


If you want to better your communication skills  , this podcast is for you . Each podcast covers various skills such as how to write effectively , how to communicate during a time of crisis , etc . Definitely would suggest listening to this podcast . 


### 4) TED Talks Daily 

- by TED

![TED_Talks_Podcast_Thumbnail_Audio_600px](https://user-images.githubusercontent.com/58665834/118599297-f06fc400-b7cc-11eb-8a5c-ecffb1c34e97.png)

TED Talks Daily is an audio version of TED talks . Podcast Episodes are uploaded very frequently and each speaker covers a different topic . So if you want to learn new things without needing to look at a screen for a long time , this is the podcast for you . 



So this is my list of favourite podcasts , hope you begin to have a liking to one of them . What are some of your favourite podcasts ?
What Are The Most Important Things to Keep in Mind When Building a Portfolio Website? ⚡
Tags: webdev, career, 100daysofcode, discuss
Published: 2021-05-18 10:01:12

**header pic by [Shen Comix](https://twitter.com/shenanigansen)*

What a perfect developer portfolio should include? What advice would you give to Bootcamp graduates and seasoned developers?  

You are welcome to showcase your portfolios 🙌

## UPDATE: 

Thank you all for your answers! 

I combined your replies with my marketing and coding knowledge and compiled this article on how to build a great devevoper portfolio. Check it out! 

{% link https://dev.to/actitime/how-to-build-a-great-developer-portfolio-examples-tools-bkj %}
5 Proven Ways To Build an Audience on Twitter
Tags: twitter, webdev, beginners
Published: 2021-05-18 09:47:05

_If you found value in this thread you will most likely enjoy my tweets too so make sure you follow me on [Twitter](https://twitter.com/VladPasca5)  for more information about web development and how to improve as a developer. This article was first published on my [Blog](https://vladpasca.hashnode.dev/_

### 1. Create valuable content

This might sound really obvious but listen to me: only a few people do that

So many people just create bad content that gives no value to others

Don't do that if you want to grow on Twitter

### 2. Make hard concepts easier for others

As long as you learned something in the past you can do this

Just explain something you know, in simple terms, with your own words and try to make it as simple as possible

### 3. Motivate/inspire others

If you managed to do something big in life talk about that

Maybe you changed your career
You made money online

It could be anything that others want to do too

Just share that with others

### 4. Build in public

This become more and more popular in the last 6 months since everyone loves that

So if you already have a product your working on, share what you do every day on Twitter

### 5. Document your journey

Talk about what you're learning about

Share the resources you are using

Teach others the concepts you just learned

These are only a few things you can do when documenting your journey

### The end

_I hope found this useful and if you did please let me know. If you have any question feel free to DM me on  [Twitter](https://twitter.com/VladPasca5) ._