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
#!/bin/bash | |
PID_FILE=/var/run/fluentd.pid | |
CONF_FILE=/etc/fluent/fluent.conf | |
LOG_FILE=/var/log/fluent/fluent.log | |
PSNAME="fluentd --daemon" | |
F_USER=fluentd | |
F_GROUP=fluentd | |
RUBY_VER="1.9.3-p194" |
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
use strict; | |
use warnings; | |
use utf8; | |
package Amon2::Plugin::DBIx::Handler; | |
use DBIx::Handler; | |
sub init { | |
my ($class, $context_class, $config) = @_; |
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
class Object | |
def send_through(object, *args) | |
object.dispatcher_for(self).call(self, *args) | |
end | |
end | |
module Dispatcher | |
class DispatcherNotFound < StandardError; end | |
def self.extended(klass) |
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
#!/usr/bin/ruby | |
#-*- coding: utf-8 -*- | |
require "rubygems" | |
require "mechanize" | |
require "hatenaauth.rb" | |
require "cgi" | |
####config | |
params = { | |
:api_key => "ここにapiキー", | |
:secret => "ここに秘密鍵" |
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
#日本語用 形態素解析もどき | |
#http://ablog.seesaa.net/article/24578324.html | |
#を移植したものです。とりあえずライセンスは、Creative commonsの表示で。商用利用OKですが、自分の名前を明記してください。 | |
#クレジット:sorah 感謝:http://ablog.seesaa.net/article/24578324.html | |
#str=形態素解析したい文字列(日本語のみ) | |
#返却するのは分割された配列。 | |
def morphAnalyzer(str) | |
s = str.gsub(/([一-龠々〆ヵヶ]+|[ぁ-ん]+|[ァ-ヴー]+|[a-zA-Z0-9]+|[a-zA-Z0-9]+|[,.、。!!??()()「」『』]+|[ ]+)/,"\\1|") | |
ary = s.split("|") |
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
// TARGET.pid のファイルを削除で終了 | |
if ( WScript.Count == 0 ) { | |
WScript.Echo("対象ファイルをD&Dしてください"); | |
WScript.Quit(); | |
} | |
var TARGET = WScript.Arguments(0); | |
// バックアップするかチェックする間隔(ミリ秒) | |
var PERIOD = 60 * 1000; | |
var AutoBackup = { |