Skip to content

Instantly share code, notes, and snippets.

View iamads's full-sized avatar

Abhijeet De iamads

  • Bangalore,India
View GitHub Profile
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
@iamads
iamads / js
Created April 19, 2022 11:47
Assembly task
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!");
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>
@iamads
iamads / ecr.sh
Last active August 29, 2020 09:24
ECR login + Build docker image and push
$(aws ecr get-login --no-include-email)
docker build -t <REPOSITORY_URL> .
docker push
@iamads
iamads / Dockerfile
Created August 29, 2020 09:00
Simple Node App Dockerfile
FROM node:14.7.0-alpine3.10
WORKDIR /usr/src/app
COPY . .
RUN npm install
EXPOSE 8080
[
{ "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"}
]
class Node {
constructor(value) {
this.value = value;
this.next = null;
}
}
class LinkedList {
constructor() {
this.head = null;
@iamads
iamads / filterExamples.js
Created May 20, 2019 14:12
filterExamples
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' },
@iamads
iamads / myFilter.js
Created May 20, 2019 13:56
myFilter
const myFilter = (array, callback) => {
const newArray = [];
array.forEach(element => {
if (callback(element)) {
newArray.push(element)
}
})
return newArray;
}
@iamads
iamads / filter1.js
Created May 20, 2019 13:48
filter1
const words = ['spray', 'limit', 'elite', 'exuberant', 'destruction', 'present'];
const bigWords = words.filter(word => word.length > 6);
// console.log(bigWords) returns ["exuberant", "destruction", "present"]