Skip to content

Instantly share code, notes, and snippets.

View akshaymittal143's full-sized avatar
🎯
Focusing

Akshay Mittal akshaymittal143

🎯
Focusing
  • Austin, Texas
View GitHub Profile
@akshaymittal143
akshaymittal143 / The Technical Interview Cheat Sheet.md
Created December 23, 2016 22:03 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@akshaymittal143
akshaymittal143 / booksjson.js
Created September 22, 2017 00:22
To import Book data into your mongoDB database. Make sure MongoDB is running then run 'mongo bookAPI < booksJson.js' from the command line.
db.books.insert([
{
title: 'War and Peace',
genre: 'Historical Fiction',
author: 'Lev Nikolayevich Tolstoy',
read: false
},
{
title: 'Les Misérables',
genre: 'Historical Fiction',
@akshaymittal143
akshaymittal143 / gist:7167665ec72cbe9d443f7d9250aa99fc
Created October 10, 2017 01:30
Quick Setup for setting Git project
It is recommended that every repository include a README, LICENSE, and .gitignore.
# create a new repository on the command line
* echo "# Angular-First-Project" >> README.md
* git init
* git add README.md
* git commit -m "first commit"
* git remote add origin https://github.com/akshaymittal143/Angular-First-Project.git
* git push -u origin master
@akshaymittal143
akshaymittal143 / gcp-cheatsheet.md
Last active July 17, 2018 16:45
gcp_cheatsheet

GCP Cheatsheet:

Basic commands:

  • gcloud projects list

  • gcloud init

  • gcloud components update

  • gcloud components install COMPONENT_ID

@akshaymittal143
akshaymittal143 / docker-compose.txt
Last active August 20, 2018 02:59
Install docker-compose
# Install docker-compose
COMPOSE_VERSION=`git ls-remote https://github.com/docker/compose | grep refs/tags | grep -oP "[0-9]+\.[0-9][0-9]+\.[0-9]+$" | tail -n 1`
sudo sh -c "curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
sudo chmod +x /usr/local/bin/docker-compose
sudo sh -c "curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VERSION}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose"
@akshaymittal143
akshaymittal143 / proxy.conf.json
Created August 20, 2018 19:42
ng6 proxy.conf.json for spring boot
{
"/server": {
"target": "http://localhost:8080",
"secure": false,
"changeOrigin": true,
"logLevel": "debug",
"pathRewrite": {
"^/server" : ""
}
}
@akshaymittal143
akshaymittal143 / movies.js
Created October 6, 2018 19:41
getMovies title
const https = require('https');
/*
* Complete the function below.
* Use console.log to print the result, you should not return from the function.
*/
function getMovieTitles(substr) {
pageNum = 1;
let url = 'https://jsonmock.hackerrank.com/api/movies/search/?Title=' + substr + "&page=" + pageNum;
https.get(url, (res) => {
res.setEncoding('utf8');
static String longestEvenWord(String sentence) {
//splitting words by space
String words[] = sentence.split(" ");
//sorting descending
Arrays.sort(words, (b, a)->Integer.compare(a.length(), b.length()));
for(String word: words) {
if(word.length() % 2 == 0) {
@akshaymittal143
akshaymittal143 / gist:6bacfb0309332d14fd31c304780da125
Created June 9, 2020 21:30
git pull all nested repo from the base dir
add this into `.bash_profile`
alias git-pull-all="find . -maxdepth 3 -name .git -type d | rev | cut -c 6- | rev | xargs -I {} git -C {} pull"