This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: build | |
build: | |
echo "javascript:" | tr -d '\n' > bookmarklet.js | |
uglifyjs src.js >> bookmarklet.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# encodeされたURLを日本語に戻す | |
# | |
# Author: | |
# @shokai | |
module.exports = (robot) -> | |
robot.hear /(https?:\/\/[^ ]+)/i, (msg) -> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
debug = require('debug')('hubot-ore-api') | |
config = | |
url: 'https://ore-api.herokuapp.com' | |
slack: | |
room: "#news" | |
module.exports = (robot) -> | |
socket = require('socket.io-client').connect config.url |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# hubot anonymous post | |
# | |
# Commands: | |
# hubot anon MESSAGE | |
# hubot anon #general MESSAGE | |
# | |
# Author: | |
# @shokai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Gyazz更新通知 | |
# /hubot/gyazz-webhook へのPOSTリクエストを受信 | |
# | |
# Dependencies: | |
# "diff": "*" | |
# "debug": "*" | |
# | |
# Author: | |
# @shokai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def wh(uA) | |
raise ArgumentError, "argument must be instance of Array" unless uA.kind_of? Array | |
uA.each do |url| | |
puts "#{url}について何か処理する" | |
end | |
end | |
wh ["かずどん", "zanmai"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 1つランダムに選ぶ | |
_ = require 'lodash' | |
module.exports = (robot) -> | |
robot.respond /choice (.+)/i, (msg) -> | |
items = msg.match[1].split(/\s+/) | |
choice = _.sample items | |
msg.send "厳正な抽選の結果、「#{choice}」に決まりました" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
noble = require 'noble' | |
_ = require 'lodash' | |
UUIDs = | |
service: "713d0000-503e-4c75-ba94-3148f18d941e".replace(/\-/g, '') | |
tx: "713d0003-503e-4c75-ba94-3148f18d941e".replace(/\-/g, '') | |
rx: "713d0002-503e-4c75-ba94-3148f18d941e".replace(/\-/g, '') | |
noble.on 'discover', (peripheral) -> | |
if peripheral.advertisement.localName is "BlendMicro" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
noble = require 'noble' | |
noble.on 'discover', (peripheral) -> | |
if peripheral.advertisement.localName is "BlendMicro" | |
console.log "device found" | |
peripheral.on 'connect', (arg) -> | |
console.log 'connect!!' | |
peripheral.connect() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Slackbot = require 'slackbot' | |
slackbot = new Slackbot 'masuilab', process.env.SLACK_TOKEN | |
slackbot.send '#general', process.argv[2] or "ヘーイ提督ー" |