ashish@home:~$

  • Making Suspend Work On Lenovo Z510

    Suspend never worked with Linux on my Lenovo Z510. Recently I came across this issue while looking for a fix (I use NVIDIA Prime, not Bumbleebee). Suspend now works on my laptop by doing: sudo vim /etc/default/grub Replace GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" with GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=\"!Windows 2013\" acpi_osi=Linux" sudo update-grub Reboot.

  • 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...