Skip to content

Instantly share code, notes, and snippets.

@kenzo0107
Created April 7, 2017 09:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kenzo0107/81116624f6c23ffaf5bb56d7a64c9c39 to your computer and use it in GitHub Desktop.
Save kenzo0107/81116624f6c23ffaf5bb56d7a64c9c39 to your computer and use it in GitHub Desktop.
# Description:
# Example scripts for you to examine and try out.
#
# Notes:
# They are commented out by default, because most of them are pretty silly and
# wouldn't be useful and amusing enough for day to day huboting.
# Uncomment the ones you want to try and experiment with.
#
# These are from the scripting documentation: https://github.com/github/hubot/blob/master/docs/scripting.md
cronJob = require('cron').CronJob
random = require('hubot').Response::random
module.exports = (robot) ->
cronjob = new cronJob('00 00 */3 * * *', () =>
say = 'Hello ! My name is Ruby-Chan ! \n' + random [
'会社というのは都合のいいように、プログラマには歯車であってほしいと考えます。コードが美しいかどうか、アートかどうかなど関心を持っていません。内面の美は外から見えず、コードに内在しています。ソースコードはアートで、作品なのです。……アーティストは歯車ではない。 by まつもとゆきひろ'
'僕らは常に、未来の理想に向けてではなく、今やれる最高のことだけを目指してきた。常にがむしゃらに、目先のことを追い続けてきただけなんです。 by 宮本 茂'
'私は芸術的なことが好きですので、Perlをひとつの芸術作品だと考えていますが、ほかの人たちが芸術作品をつくるための道具とも考えています。 by Larray Wall'
'未来を予測する最善の方法は、自分でそれを創り出すことだ。 by アラン・ケイ'
'ハングリーであれ、愚かであれ。 by Steve Jobs'
'シンプルであることを保て。 by James Gosling'
'上司からクビにされないうちに仕事を片付けられれば、それは「正しい」Perlスクリプト by Larray Wall'
'私は問題を解くためにC++を設計したのであり、何かを実証するために作ったのではない byBjrne Stroustrup'
'最後まで希望を捨てちゃいかん。あきらめたらそこで試合終了ですよ by 安西光義'
]
envelope = room: "#have_a_chat"
robot.send envelope, say
)
cronjob.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment