Skip to content

Month: June 2015

Using Go to Recover JPEGs from a Forensic Image

CS50 is an introductory course offered by Harvard to students at the college and online via EdX and the Harvard Extension School. It teaches mostly through a series of problems sets which mostly focus on using C to solve them. One of the more interesting problem sets is Problem Set 4: Forensics. The Problem The original problem was solved in C as part of the course and here will be solved using Go. But before looking at any code it is important to give a little context (all code is available on GitHub for those that are interested). Key characteristics of the problem have been outlined below: What we…

Finding Lost Commit History using the GitHub API

It is quite easy to lose commit history in Git. A mistaken forced push is enough to rewrite the past and lose valuable work. Assuming the user in question has not done a git fetch in a while reflog won’t help you either. This happened to me while dealing with a branch that had a misconfigured remote pointing to the mainline. In my stupor, I forced the push. Outdated reflog! Perhaps GitHub has the Answer? All is not lost however you can access all the information you need via the GitHub API. Assuming you have stopped the team making anymore commits to the…