Skip to content

Instantly share code, notes, and snippets.

View nhnmomonga's full-sized avatar
🐭
Love Chinchilla

nhnmomonga nhnmomonga

🐭
Love Chinchilla
View GitHub Profile
@nhnmomonga
nhnmomonga / TagCrawler.php
Last active December 25, 2015 12:39
TagCrawler
<?php
class TagCrawler {
private $api_url;
private $target_tags;
private $output_file_name;
const PAGE_MAX = 200;
const MAX_RECORD_PAR_PAGE = 50;
const WORK_ID = 0;
const USER_ID = 1;
const TITLE = 3;
<?php
function plugin_machinations_init() {
}
function plugin_machinations_inline() {
$args = func_get_args();
$xml = $args[0];
$width = $args[1];
$height = $args[2];
ERROR_MESSAGE = process.env.HUBOT_ZATSUDAN_ERROR_MESSAGE or 'エラーです'
zatsudan = (msg, zatsudan) ->
request = require('request')
request.post({url : "https://api.apigw.smt.docomo.ne.jp/dialogue/v1/dialogue?APIKEY=XXXXXX",
form : {"utt" : "#{zatsudan}", "place" : "東京", "mode" : "dialog"}}, (err, httpResponse, body) ->
if error or httpResponse.statusCode != 200
return msg.send("雑談に失敗しました")
data = JSON.parse(body)[0]
msg.send "#{data.utt}")
input {
file {
path => "<抽出したログへのパス>"
type => "miraivariant"
start_position => "beginning"
}
}
filter {
csv {
columns => ["timestamp","source_ip","source_port","dist_port"]
@nhnmomonga
nhnmomonga / test
Created September 24, 2019 06:12
test
echo "this is test" > test.txt
@nhnmomonga
nhnmomonga / tag.html
Last active April 3, 2021 06:24
ピクスペの店舗説明で使えるタグ
<center><b>作品置き場</b></center>
<a href="■自分のTwitterアカウントのURL■" target="_blank" rel="noopener">
<div style="text-align:center;background:#12a5f4;padding:0.8em;margin:0.5em;text-decoration:none;color:#eeeeee;">
Twitter</div></a>
<a href="■自分のpixivのURL■" target="_blank" rel="noopener">
<div style="text-align:center;background:#005bd3;padding:0.8em;margin:0.5em;text-decoration:none;color:#eeeeee;">
Pixiv</div></a>