Skip to content

Instantly share code, notes, and snippets.

redisClient = require('redis').createClient()
unixtime = require('unixtime')
push = require('pushover-notifications')
pushoverClient = new push({user:YOUR_USER_TOKEN,token:YOUR_API_TOKEN})
module.exports = (robot) ->
robot.respond /(regtan).*(呼んで|よんで).*/i, (msg) ->
isRateLimited (err,result) ->
if err
msg.send("redis エラーですー")
var request = require('request');
function nicovideo_search(query , callback) {
options = {
uri : 'http://api.search.nicovideo.jp/api/',
form : JSON.stringify(query),
json : true
};
request.post(options, function(error, response, body){
新検索β api request
{
"query" : "艦これ",
"service" : ["video"],
"search" : ["title"],
"join" : ["cmsid", "title","description"],
"filters" : [ ],
"from" : 0,
"size" : 3,
"sort_by" : "view_counter",
@regtan
regtan / xp_sutero.markdown
Last active August 29, 2015 14:00
iTunesのライブラリ移動

Appleサポートコミュニティ

https://discussionsjapan.apple.com/docs/DOC-1024

ライブラリの移動

  1. itunesを終了させる
  2. itunesのライブラリを探す
    • Windows XP
      • [windowsの入ってるドライブ]¥Documents and Settings¥[ユーザー名]¥My Documents¥マイ ミュージック¥iTunes
    • Windows Vista、Windows 7、Windows 8
  • [windowsの入ってるドライブ]¥ユーザー¥[ユーザー名]¥ミュージック¥iTunes
@regtan
regtan / dandori.md
Last active December 25, 2015 09:59

#これはなに? 段取りです

流れ

オープニング

  • オープニングの宣言&挨拶(壇上:regtan)
    • 本日はご来場ありがとうございます的な挨拶
    • 撮影時の注意の説明(撮影NGな方おられますか?)
    • 中継している旨の説明(うつりたくない人は注意してくださいなどの)
  • カルカルでのオーダーの説明(オススメメニューなどの紹介)
@regtan
regtan / mixivoicecounter.user.js
Created August 3, 2012 15:52
mixiのvoiceの未読件数をタイトルバーに表示するuserscript
// ==UserScript==
// @name mixivoicecounter
// @namespace regtan
// @description for mixi voice
// @include http://mixi.jp/*
// ==/UserScript==
function voice_counter(){
var newFeed = document.getElementsByClassName("newFeed")[0];
if(newFeed != null){
@regtan
regtan / automixivoice.user.js
Created July 31, 2012 16:35
mixiのvoiceを自動的に読み込むuserscript
// ==UserScript==
// @name automixivoice
// @namespace regtan
// @description for mixi voice
// @include http://mixi.jp/*
// ==/UserScript==
function voice_reload(){
var newFeed = document.getElementsByClassName("newFeed")[0];
if(newFeed != null){
@regtan
regtan / gist:3182917
Created July 26, 2012 16:00
mountain lionでターミナル立ち上げたらgit_compare_version:4: command not found: git

##これはなに? mountain lionインストールしてterminal立ち上げたらこんなエラーがでてゲンナリしたので対応方法まとめ ##これが発生した環境

  • mountain lion
  • oh-my-zsh

##原因はなに? 大きく分けて2つ

  • gitがそもそも消えてしまった
  • oh-my-zsh.zshがgitを解決できない
package org.kirino;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.math.random.RandomData;
import org.apache.commons.math.random.RandomDataImpl;
public class Gacha {
public static void main(String[] args) {
@regtan
regtan / log4j.xml
Created October 28, 2011 03:21
log4jの設定ファイルサンプル デイリーローテート&サイズローテート
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="FILE"
class="org.apache.log4j.CompositeRollingFileAppender">
<param name="File" value="log/sample.log" />
<!-- MaxFileSizeを外すとデイリーローテートのみ -->
<param name="MaxFileSize" value="10MB" />