Skip to content

Instantly share code, notes, and snippets.

View D3press3dd's full-sized avatar
🏠
Working from home

Anthony Rosman D3press3dd

🏠
Working from home
View GitHub Profile
@D3press3dd
D3press3dd / gist:68becda372646fdcc66b5981edf78f2c
Created September 16, 2023 19:01
setting preference json
{
"editor.wordWrap": "off",
"emmet.includeLanguages": {
"javascript": "javascriptreact"
},
"workbench.iconTheme": "material-icon-theme",
"files.autoSave": "onFocusChange",
"editor.formatOnSave": true,
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
@D3press3dd
D3press3dd / gist:1d26d9a1bb41b69878c853b217380975
Created November 3, 2022 15:46
Instalación y configuracion de Jest + React Testing Library en proyectos de React + Vite
# Instalación y configuracion de Jest + React Testing Library
## En proyectos de React + Vite
1. Instalaciones:
```
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
```
2. Opcional: Si usamos Fetch API en el proyecto:
@D3press3dd
D3press3dd / gist:429b6155bd7a0fbb00c61ad80afa0703
Last active August 6, 2022 16:31
Make a program that filters a list of strings and returns a list with only your friends name in it. If a name has exactly 4 letters in it, you can be sure that it has to be a friend of yours! Otherwise, you can be sure he's not... Ex: Input = ["Ryan", "Kieran", "Jason", "Yous"], Output = ["Ryan", "Yous"] i.e. frien
7 kyu kata answer to 'Friend or Foe?
function friend(friends){
return friends.filter(singleFriend=>singleFriend.length===4);
}