This file contains hidden or 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
| brew install zsh | |
| Git alias commans: https://gist.githubusercontent.com/DavidToca/3086571/raw/cabe5fef7d9e607c137b1e57d0e3aa1df05a16a8/git.plugin.zsh | |
| brew install jandedobbeleer/oh-my-posh/oh-my-posh | |
| eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/catppuccin.omp.json)" | |
| brew install fzf |
This file contains hidden or 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
| const bodyParser = require('body-parser'); | |
| const express = require('express') | |
| const port = 3800; | |
| const museumData = require('./data.json'); | |
| const _ = require('lodash'); | |
| const app = express(); | |
| app.get("/", (req, res) => { | |
| res.send("Hello World!"); |
This file contains hidden or 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
| image: docker:19.03.10 | |
| services: | |
| - docker:dind | |
| variables: | |
| REPOSITORY_URL: <REPOSITORY_URL> | |
| TASK_DEFINITION_NAME: <Task_Definition> | |
| CLUSTER_NAME: <CLUSTER_NAME> | |
| SERVICE_NAME: <SERVICE_NAME> |
This file contains hidden or 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
| $(aws ecr get-login --no-include-email) | |
| docker build -t <REPOSITORY_URL> . | |
| docker push |
This file contains hidden or 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
| FROM node:14.7.0-alpine3.10 | |
| WORKDIR /usr/src/app | |
| COPY . . | |
| RUN npm install | |
| EXPOSE 8080 |
This file contains hidden or 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
| [ | |
| { "username": "Anita", "email": "anita@gmail.com", "age": 23, "gender": "female", "phone": "9876543210"}, | |
| { "username": "Rakesh", "email": "rakesh@gmail.com", "age": 19, "gender": "male", "phone": "9876543211"}, | |
| { "username": "Vishwa", "email": "vishwa@gmail.com", "age": 26, "gender": "male", "phone": "9876543212"}, | |
| { "username": "Sunita", "email": "sunita@gmail.com", "age": 31, "gender": "female", "phone": "9876543213"}, | |
| { "username": "Vanita", "email": "vanita@gmail.com", "age": 16, "gender": "female", "phone": "9876543214"}, | |
| { "username": "Suman", "email": "suman@gmail.com", "age": 45, "gender": "female", "phone": "9876543215"} | |
| ] |
This file contains hidden or 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 Node { | |
| constructor(value) { | |
| this.value = value; | |
| this.next = null; | |
| } | |
| } | |
| class LinkedList { | |
| constructor() { | |
| this.head = null; |
This file contains hidden or 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
| const numbers = [1, 2, 4, 5, 7, 8, 11]; | |
| const evenNumbers = numbers.filter(i => i % 2 === 0) | |
| const oddNumbers = numbers.filter(i => i % 2 !== 0) | |
| // console.log(evenNumbers) returns [2, 4, 8] | |
| // console.log(oddNumbers) returns [1, 5, 7, 11] | |
| const students = [ | |
| { name: 'prithvi', age: 20, section: 'A' }, | |
| { name: 'shubham', age: 19, section: 'B' }, |
This file contains hidden or 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
| const myFilter = (array, callback) => { | |
| const newArray = []; | |
| array.forEach(element => { | |
| if (callback(element)) { | |
| newArray.push(element) | |
| } | |
| }) | |
| return newArray; | |
| } |
This file contains hidden or 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
| const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present']; | |
| const bigWords = words.filter(word => word.length > 6); | |
| // console.log(bigWords) returns ["exuberant", "destruction", "present"] |
NewerOlder