You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2015-12-08-christmas-slack-o-meter.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,30 +40,30 @@ One of the topics for this Hackathon was Christmas, so we chose a simple Hack th
40
40
41
41
Obviously we were going to make something huge, loud and fantastically ambitious. We wanted a massive sign with flashing lights, sound, and a HTML front-end displayed on the big monitor in the corner of our office. This would sound a klaxon and go crazy every time a certain keyword was mentioned on one of the public channels on Slack. Since the Hackathon's topic was Christmas, our keywords would be christmassy things like 'turkey', 'sleigh bells', or 'over-commercialised'. We We lost no time in making a big mess and covering our desks in wires, arduinos, raspberry pis and coffee.
42
42
43
-

43
+

44
44
45
-
The team consisted of Aisling, fashioning the front-end, Clorama, hacking on the hardware and me bashing away at the backend. In no time we had our own mini-PRISM, our very own internal GCHQ snooping on every message in our public Slack channels. By using Slack's [outgoing webhooks](https://api.slack.com/outgoing-webhooks) we could POST every message to our own servers and analyse the text to find incidences of our trigger keywords.
45
+
The team consisted of Aisling, fashioning the front-end, Clorama, hacking on the hardware and me bashing away at the backend. In no time we had our very own internal GCHQ snooping on every message in our public Slack channels. By using Slack's [outgoing webhooks](https://api.slack.com/outgoing-webhooks) we could POST every message to our own servers and analyse the text to find incidences of our trigger keywords.
46
46
47
-
I used [Hapi](hapijs.com), a rich API framework that we've used for Hacks before. I wanted to use this Hackathon to familiarise myself with its structure, and I found it great - a quickly assembled springboard to launch our application from. For persistence we used [MongoDB](https://www.mongodb.org/) and to simplify DB connections and schema we used [Mongoose](http://mongoosejs.com/), both of which play nicely with Hapi.

49
+
For the API I used [Hapi](hapijs.com), a rich API framework that we've used for Hacks before. I wanted to use this Hackathon to familiarise myself with its structure, and I found it great - a quickly assembled springboard to launch our application from. For persistence we used [MongoDB](https://www.mongodb.org/) and to simplify DB connections and schema we used [Mongoose](http://mongoosejs.com/), both of which play nicely with Hapi.
50
50
51
-
But the hardware was still giving us a headache. After much deliberating and some eating of humble Pi we decided to scale back our ambitions and instead focus on the Live Demo we would have to give in what suddenly seemed like very little time.
51
+
But the hardware was still giving us a headache. After much deliberating and some eating of humble Pi we decided to scale back our ambitions and instead focus on the Live Demo, since 5pm had somehow leapt on us out of nowhere, like an Australian dropbear.
We decided to make something interactive, a simple challenge that we could issue during the Live Demo. Our front-end would be a huge gauge that would constantly poll our API for the current number of triggered keywords and display it using a big, red, jolly needle. Ho ho ho. We would then challenge our audience to send the needle flying with a deluge of Christmas excitement. The first person to send the needle over edge of the gauge would be declared the winner, preferably amid explosions and baubles.
56
58
57
-
Now with a suitably re-scoped idea, we set to work on the front-end. We made a simple script that would poll our API and translate that into a `transform: rotate(x)` css declaration for the needle.
58
-
59
-

59
+
Now with a suitably re-scoped idea, we set to work on the front-end. We made a simple script that would poll our API and translate our Christmas metric into a `transform: rotate(x)` css declaration for the needle.
60
60
61
61
With a bit of frantic typing right up until the last moment, we managed to do it. And here's a screencapture of the amazing, exhilirating moment when we declared the winner.
62
62
63
-

63
+

64
64
65
65
### In Summary
66
66
67
-
It was a great Hackathon, and we learnt a lot about some technologies we'd never even touched before. Although the end result was a bit naff, and there's a low probability that our invention will actually save mankind, we did manage demonstrably measurable amounts of good cheer.
67
+
It was a great Hackathon, and we learnt a lot about some technologies we'd never even touched before. Although the end result was a bit naff, and there's a fairly low probability that our invention will actually save mankind, we did manage demonstrably measurable amounts of good cheer.
0 commit comments