Skip to main content

    Common Git Commands

    Here are some common git commands for a basic working session using git.

    git remote rm origin
    git remote add origin git@gitlab:atindale/repos.git


    git remote set-url origin http://gitlab/USERNAME/OTHERREPOSITORY.git

    git config --format=full

    git tag -a v1.0 "First version of software"
    git push --follow-tags

    git tag -d v1.0
    git push --follow-tags


    Building websites with Python and Flask

    Over the course of my learning I have ended up with a base configuration for serving Python web applications. This configuration utilised the nginx web server together with uwsgi as the Python > web gateway. As is the norm it is recommended to utilise virtualenv to isolate your software requirements. The full stack is:

    • virtualenv
    • Python
    • Flask
    • uwsgi
    • Supervisor
    • nginx

    The standard operating system I go to for web apps such as this is Ubuntu. The steps detailed below are all given for that operating system.



    Selecting first/least/max row per group in SQL

    Here are some common SQL problems, all of which have related solutions: how do I find the most recent log entry for each program? How do I find the most popular item from each category? How do I find the top score for each player? In general, these types of “select the extreme from each group” queries can be solved with the same techniques. I’ll explain how to do that in this article, including the harder problem of selecting the top N entries, not just the top 1.


    My, what is going on in the BI world!

    Business Intelligence is big business. It almost seems like every software company in existence has some sort of “BI” suite. Of course those companies are at different stages of maturity and understanding or focussing on a different segment of the market just as many customers have different wants and needs. Some suites are little more that the old line reporting tools we may be familiar with. On the other hand, some companies are forging ahead into cutting edge branches such as the statistical exploitation of data and into the mobile device area which has become so ubiquitous. All of this software choice does lead to confusion in the marketplace. I have often been party to vendor sales processes where I’ve not been convinced the vendor knows what they are selling! But, choice is never a bad thing, we can all look forward to much more innovation in this space.

    NFS Datastore Inactive on Reboot

    I rebooted the ESXi host just now after updating to ESXi 4.0 Update 2 and an NFS datastore was marked as “inactive”.

    Inactive NFS Datastore

    Decided to change some of the NFS parameters as follows

    NFS.HeartbeatFrequency = 12
    NFS.HeartbeatMaxFailures = 10

    The original values of these parameters was:

    NFS.HeartbeatFrequency = 9
    NFS.HeartbeatMaxFailures = 3

    We’ll see how we go with this, I’ll update this post with any follow-up.

    Update: Having rebooted a copy of times these settings seem to have done the trick.