Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Arjunkumar tk120404

🎯
Focusing
View GitHub Profile
@tk120404
tk120404 / nodeAsyncTest.js
Created Sep 6, 2019 — forked from aescarcha/nodeAsyncTest.js
Javascript async / await resolving promises at the same time test
View nodeAsyncTest.js
// Simple gist to test parallel promise resolution when using async / await
function promiseWait(time) {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(true);
}, time);
});
}
View api-cheatsheet-array.md

Array<T>

Legend:

  • ✏️ method changes this.
  • 🔒 method does not change this.

Array<T>.prototype.*:

  • concat(...items: Array: T[] 🔒 ES3
View memory-leaks.md

In this article I will take a very simplistic approach in understanding memory leaks and I will also attempt to diagnose them.

In todays world of abundant memory, we seldom worry about memory leakages. But I hate to tell you that we live in a real world and nothing comes for free.

Oh my fancy functional programming

Disclosure: I absolutely love functional programming. Functional programming is cool and with the new ES6 syntax it becomes even cooler.

@tk120404
tk120404 / nginx-websocket-proxy.conf
Created Jan 20, 2018 — forked from uorat/nginx-websocket-proxy.conf
Nginx Reverse Proxy for WebSocket
View nginx-websocket-proxy.conf
upstream websocket {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/websocket.access.log main;
@tk120404
tk120404 / introrx.md
Created Dec 1, 2015 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
View introrx.md
View promises.md

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.