Prepend commit messages with JIRA issue number from branch name

git commits
Standard

Prepending JIRA issue number to commit messages lets you link all commits to a JIRA issue. This makes it possible to view what issues are in a build in bamboo.

Copy the file below to \.git\hooks and it will automatically commit messages with the JIRA issue number from branch name.
Branch name can be anything like “JIRA-1234 some text here”.

JIRA Agile timelapse

cric-aus-jira-timelapse.mov
Standard

I was really taken up by this timelapse video of a physical scrum board, but unfortunately we had a virtual JIRA board at the time. So using CasperJS/PhantomJS/SpookyJS (headless browser screen capture), NodeJS/Heroku (backend), AngularJS/Bootstrap (fontend), imgur (image hosting) and  Uptime Robot (scheduling) I was able to whip up a poor mans timelapse for virtual JIRA boards using only free tiers of services.

Uptime Robot performs a health check on the url /api/projects/take_screenshots every 15 minutes, which is mapped to take_screenshots() function in the projects controller.  This function logs into JIRA using CasperJS, navigates to the Scrum/Kanban board and takes a screenshot.

This screenshot then gets uploaded via the imgur.com api and the returned url gets inserted back into mongoDB.

AngularJS retrieves each project with it’s captured screenshot urls to display them in a Bootstrap carousel.

TODO: Create videos from the screenshots and upload to youtube.

This is an open source project, so feel free to fork and send pull requests.

Debugging client/server requests with req.uest.info

Screen Shot 2014-12-21 at 12.55.31 pm
Standard

req.uest.info is an open source online debugging tool for capturing and displaying  requests from clients in JSON without the need for a server, built using Node, MongoDB, Express, Angular & Socket.io.

The demo http://req.uest.info is currently hosted on Heroku. Simply set your form or application submit url to http://req.uest.info/submit/ and view the submission data.

When a REST request is made to /submit url the node express route/handler re-transmits/pushes the data to all connected clients using socket.io emit.

This message is handled on the client side by the angular socket.io service.

On row click, the data is passed through a json syntax highlighter and displayed.

TODO: Currently requests are visible to all by default, I’m working on allowing logged in users to make private requests from a set of IP addresses. The user authenticating and IP address management is already implemented using MongoDB and passport.js. What’s left is to search for the ip address when a request arrives, then if a match is found, send the request only to the users connected client. (ip address of each logged in client will have to be stored with their socket connection).

This was a fun experiment in the MEAN stack and socket.io. Javascript and it’s developer tools (npm,bower,yeoman,jade,bootstrap,etc) are maturing fast enabling rapid development of projects like these in a few nights rather than months.

Feel free give feedback in the comments below or to submit a pull request/fork.

Automated regression testing of JIRA stories

Screen Shot 2014-05-23 at 2.44.19 am
Standard

Intro

When a story is ‘done’ and ‘on the bus’, it’s expected to stay that way until go live. When working in a large team that share a code base, it’s common to break each others stuff.

Automated regression testing has long existed in most applications but for many web sites because it’s impossible to write tests to verify if a website was being displayed correctly. Today opensource tools like Wraith, Huxley, PhantomCSS, PhotoBox etc solve this issue using screencapture comparison techneques.

What will this post help me do?

Automate website regression testing for agile teams that use JIRA. This will prevent you from committing code that can undo previously completed stories.

JIRA stories are used to add test URLs. Every team member can view them which help increase test coverage.

Continue reading

Phone-embed.info

Screen Shot 2014-05-07 at 11.33.28 pm
Standard

This started out as a quick project to interactively showcase my mobile portfolio, but turned into a project on it’s own taking a few days to complete. This allows you to embed a mobile site at any size while maintaining the scale of its contents.

You can try it now at http://phone-embed.info

Github project page:
https://github.com/chris-gunawardena/iphone-embed

Continue reading for an example. Continue reading

Planning-Poker.net mobile web app

icon_29726 copy
Standard

This mobile web app was created to be device and platform agnostic. It currently works on iOS, Android, Windows Phone 8.1 and any desktop browser without needing to download and install from an app store.

Agile Planning Poker is a estimating technique used by scrum teams to make faster and more accurate estimations using a deck of cards. Now instead of looking for a deck of cards, all you have to do is open http://planning-poker.net/ on your mobile phone :)

GPL licensed source code available at https://github.com/chris-gunawardena/planning-poker

Continue reading for a demo.
Continue reading

Building a clock based on Arduino

SONY DSC
Standard

I keep hearing smart watches, wearables, internet of things etc. which got me thinking about the hardware and embedded systems used to create them. As much as I love soldering and reading resister codes I’m ashamed to say the most complicated thing I’ve made was an FM transmitter.

Since I had an Arduino lying around I decided to build a watch to learn more about the hardware side of things. The plan was to build a POC clock using the Arduino and then shrink it to a watch using an ATtiny .
Continue reading

Host your own Tor site using Apache, Ubuntu & Vagrant

tumblr_inline_mkjx01KSoV1qz4rgp
Standard

Tor is used by millions around the wold to access information without censorship, government or snooping.

While Tor makes it possible to access censored websites anonymously it is just as easy to host your own anonymous Tor website.

Clone the Vagrant project: https://github.com/chris-gunawardena/tor-hiddenservice-webhost and run vagrant up for your own Tor hidden/darknet website.
Continue reading

How to start a new web project

image05
Standard

Web development has long been an ad hoc process and the trend has been to clone or download various libraries/frameworks into folders depending on your programming background and never touch them again. Most don’t minify, lint or combine js/css file for the sake of readability and maintainability. Thanks to new developments in web technologies this doesn’t have to be a Friday night argument at the pub along with where to place the opening brackets and how many spaces/tabs should be used for indenting.
Continue reading