I write about

    How to ignore files only locally in git?

    How to ignore files only locally in git? I have automated tests running everyday, and the issue is that those tests make necessary changes to certain files depending on which test is running. This becomes a problem when I have to report the changes in the repo, as this will report untracked changed, which means I have to ignore certain files such that local Git doesn't report changes in them specifically.... [Read More]

    How can I merge two or more Git commits into one[locally and remote]?

    How can I merge two or more Git commits into one[locally and remote]? You can do this fairly easily without git rebase or git merge --squash. In this example, we'll squash the last 3 commits. If you want to write the new commit message from scratch, this suffices: git reset --soft HEAD~3 && git commit If you want to start editing the new commit message with a concatenation of the... [Read More]

    Repurpose Old Smartphones for Home Automation by Turning Sensors into Signals [Paper]

    Repurpose Old Smartphones for Home Automation by Turning Sensors into Signals [Paper] Abstract: This paper proposes an approach to building a low-cost offline home automation or appliance automation by means of re-purposing old and unused smartphones by means of exploiting low-level sensors such as an accelerometer, microphone, GPS, and temperature. It takes information about the surrounding environment through the low-level sensors from a smartphone's sensor(s) and uploads it directly to... [Read More]

    Diagnosing LAN Speeds

    Diagnosing LAN Speeds After having network issues/degradation while trying to access a work server, I had to diagnose the network the server is connected to. I had to set myself on a mission - and after realising that the seems to be very limited tools for such things, I stumbled upon 'iperf'. Iperf is a command-line tool used in the diagnostics of network speed issues, it measures the maximum network... [Read More]

    How to stop Jenkins CI build by extract a value from a JSON endpoint in bash using Curl

    How to stop Jenkins CI build by extract a value from a JSON endpoint in bash using Curl Curl the URL to get the JSON response and pipe it to the python tool. The python code will extract the value mapped to the given key (number in this case). machine='dbelab04' machineport=8080 jobname='mkat_fpga_tests_4k' buildnumber=$(curl --silent -X POST http://$machine:$machineport/job/$jobname/lastBuild/api/json?tree=number | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["'number'"]';) curl -X POST http://$machine:$machineport/job/$jobname/$number/stop Note: the above... [Read More]

    How to make Git commit to trigger a job/build in Jenkins CI

    How to make Git commit to trigger a job/build in Jenkins CI In this blog post I will show you how to configure a post commit hook on Git that notifies a Jenkins CI server about repository changes. This means that whenever a new commit is pushed to the Git repository, the cURL command line tool will be launched to initiate a Http request telling Jenkins to trigger a job.... [Read More]

    Allow users of a certain group to run a command without sudo passwd

    Time to time I usually find myself typing sudo to execute commands requiring sudo rights, and this is repetitive which simply means one gets weary of typing sudo password every time, hence this blog post. Reason for this is to remind me how to do it the next time I am faced with such conundrum(s). Suppose I wanted to add a group of users who are allowed to run mount... [Read More]

    Python's Virtualenv working with Jenkins

    Python's Virtualenv working with Jenkins If you use virtualenv to isolate your python project's environment, and want your code tested automatically -- read on, else ignore. virtualenv isolates your project's python environment virtualenv makes sure you lock down your project's main directory and all subdirectories of it. This 'lockdown' means that you never touches your global python binary, or any globally installed libraries (like "sudo pip install ipython" ). Once... [Read More]

    Smart Doorbell using Raspberry Pi

    About a year ago, I had to do a project titled Smart Home Automation using a Raspberry Pi and Arduino, part of the project  incorporated a doorbell but not just any doorbell but a Smart doorbell. Why do I call it a Smart Doorbell? A classic doorbell can be defined as a signalling device typically placed near an entry door to a building. When a visitor presses a button the... [Read More]