Skip to content

Instantly share code, notes, and snippets.

View nishantmendiratta's full-sized avatar
🎯
Always Curious!

That Js Dev nishantmendiratta

🎯
Always Curious!
View GitHub Profile
@nishantmendiratta
nishantmendiratta / node-on-ec2-port-80.md
Created May 1, 2016 22:40 — forked from kentbrew/node-on-ec2-port-80.md
How I Got Node.js Talking on EC2's Port 80

The Problem

Standard practices say no non-root process gets to talk to the Internet on a port less than 1024. How, then, could I get Node talking on port 80 on EC2? (I wanted it to go as fast as possible and use the smallest possible share of my teeny tiny little micro-instance's resources, so proxying through nginx or Apache seemed suboptimal.)

The temptingly easy but ultimately wrong solution:

Alter the port the script talks to from 8000 to 80:

}).listen(80);
@nishantmendiratta
nishantmendiratta / 1: helloworld
Last active January 15, 2020 10:02 — forked from marthall/1: helloworld
Very basic python packaging
`#!/usr/bin/env python`
```
print "Hello World"
```
@nishantmendiratta
nishantmendiratta / JavaScript: Understanding the Weird Parts in 35ish minutes - Introduction.md
Last active January 22, 2020 04:05
JavaScript: Understanding the Weird Parts in 35ish minutes - Introduction

If you are looking for a resource where you can learn Javascript in-depth. JavaScript: Understanding the Weird Parts Udemy course is highly recommended.

BUT

If you have a limited amount of time and want to Understand the Weird Parts of Javascript in 35ish minutes. Then tag along and read this post.

In 2015, I gathered all the learnings from the above mentioned Udemy course and created a document out of it. This document includes all the learnings which are the most important parts of Javascript. This document is quite handy and help me revise the complex Javascript concepts. I just want to give back something to the community. So, I will be sharing this document in the form of 6 posts.


@nishantmendiratta
nishantmendiratta / JavaScript: Understanding the Weird Parts in 35ish minutes - #BIGWORDS.md
Last active January 22, 2020 04:04
JavaScript: Understanding the Weird Parts in 35ish minutes - #BIGWORDS

Single Threaded

  • One command at a time (under the hood of browser maybe not)

Synchronous

  • One at a time and in order.

Invocation

  • Calling a function in js by using parentheses ()
@nishantmendiratta
nishantmendiratta / JavaScript: Understanding the Weird Parts in 35ish minutes - Part 1.md
Last active January 22, 2020 04:12
JavaScript: Understanding the Weird Parts in 35ish minutes - Part 1/6
@nishantmendiratta
nishantmendiratta / 24 uncomfortable things which are tough-but-worthwhile.md
Last active January 22, 2020 13:52
24 uncomfortable things which are tough-but-worthwhile

I've curated here 24 hard things that could payoff forever.

Pinned this to my twitter account as well @thatjsdev

That Javascript Dev  Startups  Money   Books on Twitter   Hard things that could payoff forever  Adapt these life-changing tweaks and lead a better life  It’s not easy  but it’s worth the effort  The list has been aggregated from bu (2)


Credits

BI

@nishantmendiratta
nishantmendiratta / JavaScript: Understanding the Weird Parts in 35ish minutes - Part 2.md
Last active February 3, 2020 14:19
JavaScript: Understanding the Weird Parts in 35ish minutes - Part 2/6
@nishantmendiratta
nishantmendiratta / sum(1)(2)(3)(4)..( n)() Frontend Javascript Interview Question.md
Last active April 22, 2024 11:57
sum(1)(2)(3)(4)..( n)() Frontend Javascript Interview Question
Credits

Visit Akshay Saini's YT channel for full video tutorial.


Can you write code for this function: sum(a)(b)(c)....( n)(). This should return the sum of all the numbers a+b+c+..+n.


// Functions in javascripts are First Class Functions
// Functions are like objects
@nishantmendiratta
nishantmendiratta / Made To Stick.md
Last active February 14, 2020 17:34
📝 Made To Stick

Background

At my current workplace every quarter we undergo a detailed Story Mapping Session which allows us to have a birds-eye view of the problem.

A brief introduction of Story Mapping: It is an engaging activity where all participants are involved in the process of building the product backlog on a wall, versus writing a dull 100-page requirement document.

The session is all about brainstorming and capturing requirements. However, it requires certain tools and this post is dedicated to one of the most important tools we need for this session i.e, Sticky Note.


Problem