[email protected]:~$

  • Using Purecomponent To Prevent Wasted Renders In React

    The shouldComponentUpdate lifecycle event in React components provides a way to have more granular control over when a component should re-render as a result of an internal state update, or as dictated by the parent. Earlier this could be done by comparing nextProps with the current props using the now...

  • Sharing Websocket In React Components

    Note - This content in this post is a bit outdated. Check out the official docs for the Context API. Often times there is a requirement to share a common websocket connection between React components. I have been using the React Context API to do that. Example for socket.io: In...

  • Gsoc Mentor This Year

    I will be mentoring students in Google Summer of Code this year for two organizations: CloudCV - project: Origami. Chapel - project: Chapel Online IDE (fresh start). Time to take a look at things from the other side of the table. Looking forward to a fruitful summer! :D

  • Get Back Github Date

    [Unmaintained] Recently Github updated their UI for the worse. As a part of this update they removed the account creation date on profile pages. Luckily, they still give out this information in an unauthenticated API. I hacked together a small WebExtension to display that date where it used to be...

  • Rewriting Jwt From Cookies To Authorization Header

    Some time back I was working on a project (webapp + android app) that uses Postgrest as an API server. The project uses JWT authentication, which is supported out of the box by Postgrest. My project has the following requirements: The webapp stores the JWT in a cookie instead of...