Skip to content

Instantly share code, notes, and snippets.

Lukasz Lenart lukaszlenart

Block or report user

Report or block lukaszlenart

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lukaszlenart
lukaszlenart / coderetreat.md
Created Mar 17, 2011 — forked from Stanley/coderetreat.md
Example how to embed charts from GDocs
View coderetreat.md
View keybase.md

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:

View gist:893b94cbb8ba2f37725bb63cc8334ed0
robot.respond /hire (.*)/i, (msg) ->
msg.finish()
fullName = msg.match[1]
....
View gist:fd1961d10d487b0e6e6f115c20836aba
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'
View ping.coffee
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]
View showsurveys.coffee
robot.respond /show survey$/i, (msg) ->
msg.finish()
loadSurveys()
.then (surveys) ->
attachments = []
attachments.push
title: survey.fullName
title_link: survey.linkToResult()
attachments
View aliases.coffee
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)
View rabbitmq-run.sh
#!/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
View rabbitmq-dockerfile
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
View old-rabbitmq-dockerfile
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 &&\
You can’t perform that action at this time.