Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Always Curious!

That Js Dev nishantmendiratta

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

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 Jan 15, 2020 — forked from marthall/1: helloworld
Very basic python packaging
View 1: helloworld
`#!/usr/bin/env python`
```
print "Hello World"
```
@nishantmendiratta
nishantmendiratta / JavaScript: Understanding the Weird Parts in 35ish minutes - #BIGWORDS.md
Last active Jan 22, 2020
JavaScript: Understanding the Weird Parts in 35ish minutes - #BIGWORDS
View JavaScript: Understanding the Weird Parts in 35ish minutes - #BIGWORDS.md

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 - Introduction.md
Last active Jan 22, 2020
JavaScript: Understanding the Weird Parts in 35ish minutes - Introduction
View JavaScript: Understanding the Weird Parts in 35ish minutes - Introduction.md

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 / 24 uncomfortable things which are tough-but-worthwhile.md
Last active Jan 22, 2020
24 uncomfortable things which are tough-but-worthwhile
View 24 uncomfortable things which are tough-but-worthwhile.md

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 / sum(1)(2)(3)(4)..( n)() Frontend Javascript Interview Question.md
Last active Jan 28, 2020
sum(1)(2)(3)(4)..( n)() Frontend Javascript Interview Question
View sum(1)(2)(3)(4)..( n)() Frontend Javascript Interview Question.md
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
View Made To Stick.md

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