updated blog code to gists