Skip to content

Commit 5cd9a4c

Browse files
author
Toby Hunt
committed
Merge branch 'master' into th-health-seminar
2 parents a362210 + 861a2ea commit 5cd9a4c

File tree

9 files changed

+98
-240
lines changed

9 files changed

+98
-240
lines changed

_posts/2015-12-08-christmas-slack-o-meter.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,22 @@ The format should be fairly recognisable to anyone that has been to a hackathon,
3232

3333
### The Project
3434

35-
One of the topics for this Hackathon was Christmas, so we chose a simple Hack that would reflect the ubiquitous festive sentiment around Pebble Towers.
35+
One of the topics for this Hackathon was Christmas, so we chose a simple Hack that would reflect the ubiquitous festive sentiment around Pebble Towers.
3636

3737
![Ubiquitous Festive Excitement](https://pbs.twimg.com/media/CVF1N6pWwAAWdue.jpg:large)
3838

3939
### The First Idea
4040

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.
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.
4242

4343
![George Hiding His Face](/img/posts/2015-12-08-christmas-slack-o-meter/george-hiding.jpg)
4444

4545
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.
4646

4747
![API diagram](/img/posts/2015-12-08-christmas-slack-o-meter/cristmas-meter-diagram.png)
4848

49-
<<<<<<< HEAD
5049
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.
51-
=======
52-
For the API I used [Hapi](http://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.
53-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
50+
5451

5552
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.
5653

@@ -62,7 +59,7 @@ We decided to make something interactive, a simple challenge that we could issue
6259

6360
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.
6461

65-
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+
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.
6663

6764
![Gif of Hack ending](/img/posts/2015-12-08-christmas-slack-o-meter/christmas-hack.gif)
6865

_sass/pages/_vertical.scss

Lines changed: 3 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99

1010
.vert-bubble-container {
1111
text-align: center;
12-
<<<<<<< HEAD
13-
=======
12+
1413
padding: 30px;
1514

1615
&:before {
@@ -20,7 +19,6 @@
2019

2120
}
2221

23-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
2422
@media screen and ( max-width: $medium ) {
2523
padding: 12px;
2624
}
@@ -31,20 +29,15 @@
3129
width: 250px;
3230
display: inline-block;
3331
position: relative;
34-
<<<<<<< HEAD
35-
=======
3632
vertical-align: top;
37-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
3833

3934
img {
4035
height: 100%;
4136
width: 100%;
4237
position: relative;
4338
top: 0;
44-
<<<<<<< HEAD
45-
=======
4639

47-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
40+
4841
@media screen and ( max-width: $medium ) {
4942
height: 100%;
5043
float: right;
@@ -61,11 +54,7 @@
6154
width: 100%;
6255
text-align: left;
6356
display: block;
64-
<<<<<<< HEAD
65-
padding: 4px 12px ;
66-
=======
6757
padding: 4px 12px;
68-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
6958
background: rgba(black, 0.2);
7059
border: rgba(white, 0.6) solid 6px;
7160
border-radius: 6px;
@@ -113,10 +102,7 @@
113102
position: absolute;
114103
top: 50%;
115104
transform: translateY(-50%);
116-
<<<<<<< HEAD
117-
=======
118105
padding-right: 128px;
119-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
120106
}
121107

122108
}
@@ -232,8 +218,7 @@
232218
background-color: $aqua;
233219
}
234220

235-
<<<<<<< HEAD
236-
=======
221+
237222
&.orange {
238223
background-color: $orange;
239224
&:before {
@@ -249,7 +234,6 @@
249234
}
250235
}
251236

252-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
253237
&.pink {
254238
&:before {
255239
transform: rotate(-1.1deg) scale(1.2);
@@ -318,15 +302,7 @@
318302
-webkit-transform: rotate(1.3deg) scale(1.2);
319303
}
320304

321-
<<<<<<< HEAD
322-
&:last-of-type {
323-
&:before {
324-
content: none;
325-
}
326305

327-
&:after {
328-
content: none;
329-
=======
330306
&:nth-last-of-type(2) {
331307
&:before {
332308
}
@@ -343,7 +319,6 @@
343319

344320
&:after {
345321
content: none;
346-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
347322
}
348323
}
349324

@@ -397,21 +372,6 @@
397372
}
398373

399374
.vert-section-table {
400-
<<<<<<< HEAD
401-
border: 2px solid darken($pink, 20%);
402-
403-
tr {
404-
// border: #333 solid 2px;
405-
background: lighten($pink, 20%);
406-
color: #333;
407-
408-
&:nth-child(odd) {
409-
background: lighten($pink, 30%);
410-
}
411-
412-
&:first-child {
413-
background: darken($pink, 20%);
414-
=======
415375
border: 2px solid darken($aqua, 20%);
416376

417377
tr {
@@ -425,20 +385,15 @@
425385

426386
&:first-child {
427387
background: darken($aqua, 20%);
428-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
429388
color: #fff;
430389
font-weight: bold;
431390
}
432391

433392
}
434393

435394
td {
436-
<<<<<<< HEAD
437-
padding-left: 8px;
438-
=======
439395
// padding-left: 8px;
440396
padding: 6px 8px;
441-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
442397
}
443398
}
444399

@@ -547,10 +502,7 @@ h4.vert-section-breadcrumb {
547502
.vert-section-large-image {
548503
width: 400px;
549504
height: 400px;
550-
<<<<<<< HEAD
551-
=======
552505
max-width: 50%;
553-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
554506
float: right;
555507
@media screen and ( max-width: $medium ) {
556508
height: 200px;
@@ -566,20 +518,6 @@ h4.vert-section-breadcrumb {
566518
// Case Study
567519
//===============================================================================
568520

569-
<<<<<<< HEAD
570-
.vert-section-case-study {
571-
width: 50%;
572-
display: inline-block;
573-
background: rgba(black, 0.2);
574-
padding: 8px 18px;
575-
display: inline;
576-
border: 4px solid rgba(black, 0.2);
577-
color: white;
578-
font-weight: bold;
579-
&:hover {
580-
background: white;
581-
}
582-
=======
583521
.vert-section-case-study,
584522
.vert-section-blog-link {
585523
margin: 20px auto;
@@ -647,5 +585,4 @@ h4.vert-section-breadcrumb {
647585
}
648586
}
649587

650-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
651588
}

_sass/shared/_sprite.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,6 @@ $ten-white: 24px 26px $gbl-sprite-path -81px -69px;
1919
$snacks-white: 20px 25px $gbl-sprite-path -58px -69px;
2020
$holiday-white: 26px 25px $gbl-sprite-path -28px -69px;
2121
$flexible-white: 25px 26px $gbl-sprite-path 0px -69px;
22-
<<<<<<< HEAD
23-
$mail-black: 29px 25px $gbl-sprite-path -137px -33px;
24-
$phone-black: 30px 30px $gbl-sprite-path -105px -33px;
25-
$location-black: 23px 32px $gbl-sprite-path -79px -33px;
26-
$close-grey: 17px 17px $gbl-sprite-path -191px -33px;
27-
$menu-grey: 19px 19px $gbl-sprite-path -169px -33px;
28-
$octocat-pink: 23px 23px $gbl-sprite-path -53px -33px;
29-
$twitter-pink: 26px 21px $gbl-sprite-path -26px -33px;
30-
$vimeo-pink: 24px 22px $gbl-sprite-path 0px -33px;
31-
=======
3222
$mail-black: 29px 25px $gbl-sprite-path -170px -33px;
3323
$phone-black: 30px 30px $gbl-sprite-path -138px -33px;
3424
$location-black: 23px 32px $gbl-sprite-path -112px -33px;
@@ -39,6 +29,3 @@ $octocat-pink: 23px 23px $gbl-sprite-path -53px -33px;
3929
$twitter-pink: 26px 21px $gbl-sprite-path -26px -33px;
4030
$vimeo-pink: 24px 22px $gbl-sprite-path 0px -33px;
4131

42-
43-
44-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5

css/main.scss

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,12 @@
7373
// INVITE: Styles for the invite pages
7474
@import "pages/_invite.scss";
7575

76-
<<<<<<< HEAD
77-
// INVITE: Styles for the invite pages
78-
@import "pages/_vertical.scss";
79-
80-
=======
8176
// SEMINAR: Styles for the seminar pages
8277
@import "pages/_seminar.scss";
8378

8479
// INVITE: Styles for the invite pages
8580
@import "pages/_vertical.scss";
8681

87-
88-
>>>>>>> f46a86a9cfc78ca6cbd0a599b9619f613cdcd1c5
8982
// IE 8
9083
// ===================================================
9184
@import "shared/_ie.scss";

0 commit comments

Comments
 (0)