Usama's Blog

Java OCA Braindump

02 Jan 2019 »

I wrote these while preparing for OCAJP exam. Most of it is in form of code with output right next to it as a comment.

Listen and visualize sorting algorithms

26 Oct 2018 »

A few weeks ago I found out this imgur gallery of sorting algorithms through a reddit post. The patterns which emerged while sorting random data looked very beautiful and amazing with the only catch that they were not interactive. You can not play with them. I decided make them in JavaScript to see what many different sorting algorithms look like, the patterns they create, while also learning them in the process.

CanvasRecorder.js

26 Oct 2018 »

I made some visualizations in HTML5 canvas and wanted to record them to display in blog. Could not find a simple way to do that. CCapture.js added too much performance overhead which made animations slow. Using built in MediaRecorder is apparently the simplest and most effitient way to record whatever is happening on canvas.

How to Root Moto X (2nd Gen) XT1093-Victara

19 Aug 2018 »

Steps to unlock its boot loader and root Moto X 2nd Gen.

How to explain git in simple words?

14 Oct 2017 »

A few years ago I started hearing about Git here and there and its various strange words like branch, index, tree, commit, clone, fork, master, origin, head, check out, check in, push and pull etc. Available tutorials were difficult to understand because they jumped straight to git commands. I approached Quora in hope for something more visual and easier to understand, then answered it myself getting most upvotes. Now posting it here on my own blog with hopefully even better explanation :)

How to get windows copy paste events with shell hook.

11 Oct 2017 »

This article was originally posted here by the author, that is no longer available.

ID3D10Device and ID3D11DeviceContext VTable Indexes

30 Sep 2017 »

I had trouble finding the index of DirectX 10 method OMGetRenderTargets for hooking. I found these VTables (ID3D10Device and ID3D11DeviceContext) somewhere on the web. Putting these here to save the trouble for someone else.