Skip to content

Instantly share code, notes, and snippets.

@AdeilsonESilva
AdeilsonESilva / vscode-remove-duplicate-lines.md
Created March 22, 2024 13:41 — forked from marcosvpj/vscode-remove-duplicate-lines.md
How to remove duplicate lines in Visual Studio Code?

If the order of lines is not important##

Sort lines alphabetically, if they aren't already, and perform these steps:
(based on this related question: https://stackoverflow.com/q/1573361/3258851)

  1. Control+F

  2. Toggle "Replace mode"

  3. Toggle "Use Regular Expression" (the icon with the .* symbol)

import express from 'express'
const app = express()
const heroService = new HeroService()
app.get('/api/hero', (req, res) => {
return res.status(200).json(heroService.getHeroes())
})
app.get('/api/hero/:id', (req, res) =>{
@AdeilsonESilva
AdeilsonESilva / rename.sh
Created June 21, 2022 11:37 — forked from mustafaturan/rename.sh
Rename all js files into jsx
for x in *.js; do mv "$x" "${x%.js}.jsx"; done