The last months i’ve picked up game development i Unity. Every week on Fridays I have a day off to work with this project. That project also comes with a new site and developer blog.
Honkbark studios
If you are interested in following that progress you can check it out at Honkbark studios
I had a Mime-type problem when downloading pdf from Sitecore site the following error showed up in the log:
8368 10:31:54 ERROR Application error.
Exception: System.ArgumentOutOfRangeException
Message: The UTC time represented when the offset is applied must be between year 0 and 10,000.
Parameter name: offset
Source: mscorlib
at System.DateTimeOffset..ctor(DateTime dateTime)
at Sitecore.Resources.Media.Streaming.Preconditions.IfRangePrecondition.CheckRequestPreconditionAndSetResponseStatus(HttpContext context)
at Sitecore.Resources.Media.Streaming.RangeRetrievalResponse.ExecuteRequest(HttpContext context)
at Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest(HttpContext context, MediaRequest request, Media media)
at Sitecore.Resources.Media.MediaRequestHandler.DoProcessRequest(HttpContext context)
at Sitecore.Resources.Media.MediaRequestHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Sitecore MimeConfig
This turned out to be a problem with MIME-types, and to solve it download the MimeConfig and add a reference to it in web.config as described in this Sitecore documentation.
Open the file and make sure that a mime entry for PDF exists and make sure it is not commented out.
How to undo a merge that has been pushed to origin? Use Revert. After merging my develop branch into the master branch i realized i didn’t want to release the code i just merged. But it was already pushed to origin. What do do?
Update: I’ve made an easy extension to git that makes this command more easy to remember, i call it gitUndo. With that extension all you need run is: git undo pushed-merge <merge-commit-hash>.
first checkout the master branch:
git checkout master
then run a git log and get the id of the merge commit.
git log
then revert to that commit:
git revert -m 1 <merge-commit>
With ‘-m 1’ we tell git to revert to the first parent of the mergecommit on the master branch. -m 2 would specify to revert to the first parent on the develop branch where the merge came from initially.
Now commit the revert and push changes to the remote repo and you are done.
Getting back the reverted changes
This changes the data to look like before the merge, but not the history. So it’s not exactly like an undo. If we would merge develop into master again the changes we reverted in master wont be applied. So if we would like these changes back again we could revert our first revert(!).
A while back me and some friends figured we should make a game now when indie games is such a hot topic and we have a few game ideas of our own that we would like to implement. To do this we need to learn some new technologies, for example 3D modeling and the engine that we have chosen because it allows us to publish games on multiple platforms, and that is unity. Hopefully this post is just the start of many ones covering the progress of making an indie game.
Tutorials
So this first post about game development i thought i’d share some nice tutorials that makes you get a hang of how unity works quite fast. They also bring a feeling of curiosity to dig deeper into the unity api.