Skip to content

Instantly share code, notes, and snippets.

View MakoTano's full-sized avatar

Makoto Tano MakoTano

  • freelancer
  • Tokyo, Japan
View GitHub Profile
@MakoTano
MakoTano / simple_response.coffee
Created August 31, 2016 09:44
単純なレスポンスサンプル
module.exports = (robot) ->
# 「予定表」という言葉に反応してURLを発言
robot.hear /予定表/i, (msg) ->
msg.send "http://sample.com/team/schedule"
# 「hubot my pr」と話かけられたら、自分向けのプルリクエスト一覧URLを発言
# この例はSlackとGithubのアカウント名が同一であることを前提にしていますが、異なる場合は変換が必要です
URL = {}
URL.PR = "https://github.com/eure/repo/pulls/assigned/"
@MakoTano
MakoTano / teach_curl.coffee
Last active August 31, 2016 09:28
hubotに対話形式を実装するサンプル
# Description:
# helps you to make curl command.
#
# Commands:
# hubot teach curl - building curl command in coversation with bot.
Conversation = require('hubot-conversation');
class CurlCommand
url = ""
@MakoTano
MakoTano / pull_request.coffee
Created August 31, 2016 08:12
プルリクエストのランダムアサイン
# Description:
# Pull Request Assign
#
# Commands:
# hubot review <url> - choose someone to review <url> pull requests.
# hubot review2 <url> - choose two members to review <url> pull requests.
MEMBER = {}
# 選出対象者としてslackの@を除いたユーザー名を半角スペースで区切ります
MEMBER.DEV = "taro jiro saburo shiro goro"
@MakoTano
MakoTano / cli_template.go
Last active May 18, 2019 12:32
github.com/codegangsta/cli を使ったコマンドラインツールのテンプレート
package main
import (
"fmt"
"os"
"github.com/codegangsta/cli"
)
func main() {
@MakoTano
MakoTano / go_interface_sample.go
Created January 14, 2016 06:39
GoInAction Chapter5 - Interface 説明その1
package main
import "fmt"
type Dog interface {
Run() error
}
// ---
type MyDog struct{}
@MakoTano
MakoTano / config.php
Last active August 29, 2015 14:03
sample config about cakephp deployment using altax. (But I use it in real)
<?php
// Altax - http://kohkimakimoto.github.io/altax/
// Autoloading for plugin command classes.
if (is_file(__DIR__ . '/vendor/autoload.php')) require_once __DIR__ . '/vendor/autoload.php';
// ***************************************************************
// Server definition. - change here.
// ***************************************************************
Server::nodesFromSSHConfigHosts();