Skip to content

Instantly share code, notes, and snippets.

View lukaszlenart's full-sized avatar
😎
Writing code for free

Lukasz Lenart lukaszlenart

😎
Writing code for free
View GitHub Profile
@lukaszlenart
lukaszlenart / coderetreat.md
Created March 17, 2011 08:04 — forked from Stanley/coderetreat.md
Example how to embed charts from GDocs

Keybase proof

I hereby claim:

  • I am lukaszlenart on github.
  • I am lukaszlenart (https://keybase.io/lukaszlenart) on keybase.
  • I have a public key ASBmXDELh0JhqIae_hjhzNfUZNxxswEHVEEeHnAK0fLhRAo

To claim this, I am signing this object:

robot.respond /hire (.*)/i, (msg) ->
msg.finish()
fullName = msg.match[1]
....
robot.listen(
(msg) ->
# catch all text messages and unhandled
if msg.text and msg.done == false
# remove bot's name
if msg.text.toLowerCase().indexOf(robot.name) == 0
regex = new RegExp "^#{robot.name}", 'ig'
msg.text.replace(regex, '').trim()
else if msg.text.toLowerCase().indexOf("@#{robot.name}") == 0
regex = new RegExp "^@#{robot.name}", 'ig'
module.exports = (robot) ->
robot.respond /ping$/i, (msg) ->
msg.finish()
msg.send "pong!\nDo you want to play again?"
robot.respond /echo (.*)$/i, (msg) ->
msg.finish()
msg.send msg.match[1]
robot.respond /show survey$/i, (msg) ->
msg.finish()
loadSurveys()
.then (surveys) ->
attachments = []
attachments.push
title: survey.fullName
title_link: survey.linkToResult()
attachments
module.exports = (robot) ->
robot.hear /^(halina)? (.+)/i, (msg) ->
msg.finish()
robot.logger.info "Catching: #{msg.match[2]}"
message = msg.message
message.done = false
message.text = message.text.replace(msg.match[1], robot.name)
#!/bin/bash
set -m
docker-entrypoint.sh rabbitmq-server &
# This is a temporary solution, please see https://www.rabbitmq.com/configure.html
echo "Waiting on RabbitMQ to start"
sleep 20
FROM rabbitmq:3.7
WORKDIR /
RUN rabbitmq-plugins enable rabbitmq_management
RUN rabbitmq-plugins enable rabbitmq_federation
RUN rabbitmq-plugins enable rabbitmq_federation_management
RUN chmod +x /docker-entrypoint.sh
FROM rabbitmq:3.7
WORKDIR /
RUN rabbitmq-plugins enable rabbitmq_management
RUN rabbitmq-plugins enable rabbitmq_federation
RUN rabbitmq-plugins enable rabbitmq_federation_management
RUN apt-get -qq update &&\
apt-get -qq install curl python &&\