Auto-deploying to my Octopress blog with Travis-CI

A couple weeks earlier, Sergey Klimov (who is @darvin at GitHub) opened the issue #940 at imathis/octopress, which is more a feature suggestion than an issue.

Within that, he has linked to his detailed blog post suggesting how the awesome Travis-CI could be configured to do the rake generate and rake deploy for you, when you add/update new posts to an octopress blog, even from browser-based editors like either the built-in GitHub editor, or a third-party tool like the prose.io editor (which is really awesome too, BTW).

For the uninitiated, Travis-CI is a really nice, open source, free and hosted continuous integration service that could build and run the unit tests for you, on every commit to a GitHub repository. It supports projects in a multitude of languages, as seen here. The service allows you to configure steps that would be run before, after and during the build and test process, with just one YAML file (named .travis.yml) in the root of your repo. Apart from running the many unit tests in the project and letting you know how your latest check-in affected the health of the project, the Travis-CI service could also do custom build tasks like a post-build deployment. And this is what Sergey has tappped into, for use with the deployment of an Octopress blog.

Read More…

Migrated this blog to Octopress

Update (03/24/2017): The blog has been migrated yet another time - this time from Octopress into Hexo and so, some of the links below will not work anymore.

Update (01/22/2013): Perhaps I blogged too soon! I’m loving the Octopress so much, that the whole site has now been updated to be built with Octopress. So some old blogs (english & technical) get redirected to the corresponding categories on the new unified blog, while some others (malayalam are still on blogger and are not linked from the site for the time being.

This blog had been on blogger since its inception back in 2009, though it really has only a very few posts in those almost-four years. The newly found love for the Octopress blogging platform, thanks to the experience setting up the flickrdownloadr blog recently, I decided to bite the bullet and move my technical blog over.

Read More…

AOP for logging in .NET

UPDATE (02/24/2013):
I did manage to figure out (thanks to Jon Skeet answering my question on SO) how to tackle the async/await scenario for a AOP logger using StructureMap and DynamicProxy. Check out the tag v0.2 the tag v0.3 1 on GitHub for the source.

Implementing the AOP pattern into a C# .NET application is something I always wanted to do. I had tried PostSharp with a few other team members, a while ago, but could not get it working soon enough, that we quit the attempt after a while.

After reading up a little more (here, here and here) I am now trying it all over again in the flickr downloadr that I am now working on.

I still haven’t completely cracked it, because the Flickr Downloadr WPF app heavily uses the new asynchrony features (async/await etc.) from .NET 4.5. I hope to somehow adapt the dynamic proxy based intercept paradigm to make it work with the new asynchronous model soonand I shall follow this up here then with the details.

Read More…

Compressing JSON - lzwCompress.js

The application that I am working on now is a nice little ASP.NET MVC4 web app, whose target audience will access it on some of the popular tablets of the day - iPad, Android and Windows 8 Surface etc.!

The USP of the otherwise regular data entry app is that it has an offline mode, so that the data collection can happen even when there is no connectivity. Even with ubiquity of the data networks, this proved to be the critical aspect of the app for the client. And among the things being cached for offline mode, there is some really hefty business look-up/metadata, that has to be there for the app to function. The fact that the app would be targeting multiple devices, and because the HTML5 recommended IndexedDB API is still not implemented by some of the major players (Opera or Safari or any iOS6 browser), we had to fall back to the better/older/more-robust and now-deprecated Web SQL database as well.

Read More…

Useful git commands

  • Compare branches after squash merge or rebase

    1
    git log --graph --left-right --cherry-pick --oneline master...experiment
  • Get git log graphically with all tags/branches:

    1
    git log --all --decorate --oneline --graph
  • Create or delete remote branches on push:

    1
    2
    3
    4
    5
    # create new remote branch on push
    git push origin mybranch
    # delete existing remote branch on push
    git push origin :mybranch