This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isAnagram(word: string, secondword: string): boolean { | |
const reversedWord = [...word].reverse().toString().replaceAll(',',"") | |
return secondword === reversedWord; | |
} | |
isAnagram('amor', 'roma') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateNumbers(from: number, to: number) | |
{ | |
for(let index = from; index <= to; index++) { | |
const message = getMessage(index) | |
console.log(message) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
db: | |
image: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
restart: always | |
ports: | |
- "3306:3306" | |
environment: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
version="1.0" | |
#validate that the user passed the parameter | |
if [ -z "$1" ] | |
then | |
echo "Please add the parameter to script ex: ./scaffold.sh blog" | |
exit | |
fi | |
#get the project name parameter | |
projectName=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Invoice { | |
public amount: number; | |
public description: string; | |
country: string; | |
} | |
class SalesInvoices extends Invoice { | |
products: Array<string> = []; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { AppComponent } from './app.component'; | |
import { Pipe, PipeTransform } from '@angular/core'; | |
import { ComponentFixture, TestBed } from '@angular/core/testing'; | |
import { TranslateService } from '@ngx-translate/core'; | |
@Pipe({ name: 'translate' }) | |
class MockPipe implements PipeTransform { | |
transform(value: string): string { | |
return ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Item { | |
key: string; | |
value: string; | |
} | |
interface IStorage { | |
getItem(key: string): Item; | |
setItem(item: Item): boolean; | |
remove(key: string): boolean; | |
} | |
// aqui uso el stragety |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tag AutoClose https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-close-tag | |
Tag highligth https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag | |
Tag Rename https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag | |
Vetur https://marketplace.visualstudio.com/items?itemName=octref.vetur | |
ESLint https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint | |
GitLens https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens | |
Sass https://marketplace.visualstudio.com/items?itemName=Syler.sass-indented | |
Live Sass Compiler https://marketplace.visualstudio.com/items?itemName=ritwickdey.live-sass | |
Prettier https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode | |
VSCode icons https://marketplace.visualstudio.com/items?itemName=vscode-icons-team.vscode-icons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-01-16T20:59:08.958Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
import Select from 'react-select'; | |
class Players extends Component { | |
state = { | |
defaultSelected: 2, | |
playerOptions: [ | |
{ value: 1, label: 'Lebron'}, | |
{ value: 2, label: 'Davis'} | |
] |
NewerOlder