Skip to content

Instantly share code, notes, and snippets.

View tk120404's full-sized avatar
🎯
Focusing

Arjunkumar tk120404

🎯
Focusing
View GitHub Profile

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 January 20, 2018 14:46 — forked from uorat/nginx-websocket-proxy.conf
Nginx Reverse Proxy for WebSocket
upstream websocket {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/websocket.access.log main;
@tk120404
tk120404 / decimalAdjust.js
Created March 2, 2017 12:32
decimal Adjustment in javascript
function decimalAdjust(value)
{
value = value.toString().split('e');
value = Math.round(+(value[0] + 'e' + (value[1] ? (+value[1] + 2) : 2)));
value = value.toString().split('e');
return +(value[0] + 'e' + (value[1] ? (+value[1] - 2) : -2));
}
*Handling performance for Progressive Web Apps at scale: Flipkart
PRPL
<link rel="preload">
https://developers.google.com/web/updates/2016/03/link-rel-preload?hl=en
requestAnimationFrame(function(){
performance.mark('first paint')});
https://developers.google.com/web/fundamentals/performance/critical-rendering-path/analyzing-crp?hl=en
First slide: tiny.cc/nxtgen
@tk120404
tk120404 / introrx.md
Created December 1, 2015 06:47 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@tk120404
tk120404 / image.js
Created May 7, 2015 10:57
Print image in the javascript console
console.log("%c ","font-size:50px;background-image:url(http://goo.gl/uMbhMT); background-size:contain; background-repeat:no-repeat;")

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.
@tk120404
tk120404 / mountusb
Created August 15, 2014 05:40
Mount usb in raspberrpi
sudo blkit
sudo mount -t vfat -o defaults,user,exec,uid=1000,gid=100,umask=000,rw /dev/sda1 /mnt/usb
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@tk120404
tk120404 / linkedlist.js
Last active October 4, 2016 13:45
LinkedList implemenation in Javascript
var LinkedList = function()
{
this._head = this._tail = null;
this._transverse = null;
this._size = 0;
}
function QEntry(prev, obj, next)
{
if (typeof obj === 'undefined' || obj === null) {