This file contains 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
# -*- coding: utf-8 -*- | |
# booshaka tweet / earthquake plugin | |
# | |
# booshaka: http://kiyosan.wordpress.com/%E3%81%B6%E3%83%BC%E3%81%97%E3%82%83%E3%81%8Bloop-%E6%AD%8C%E8%A9%9E/ | |
# | |
require 'pp' | |
class BooshakaLoop | |
@@values = [ | |
"ぶーーーぶーしゃからか ぶーーー", | |
"アイセイ ぶー", |
This file contains 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
# -*- coding: utf-8 -*- | |
# haiku tweet / earthquake plugin | |
# | |
# e.g. :tanka # => ここで一首、田子の浦ゆ うちいでて見れば真白にぞ 富士の高嶺に 雪は降りける | |
# :tanka hoge # => hoge ここで一首、田子の浦ゆ うちいでて見れば真白にぞ 富士の高嶺に 雪は降りける | |
# :tanka $xx # => @who ここで一首、田子の浦ゆ うちいでて見れば真白にぞ 富士の高嶺に 雪は降りける | |
# :tanka $xx hoge # => @who hoge ここで一首、田子の浦ゆ うちいでて見れば真白にぞ 富士の高嶺に 雪は降りける | |
# | |
Earthquake.init do |
This file contains 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
# -*- coding: utf-8 -*- | |
# | |
# input よみがな¥t単語 のTSV(UTF-8?) | |
# output 標準出力(UTF-8) | |
# 参考:http://d.hatena.ne.jp/code46/20090531/p1 | |
# 参考:http://tmp.blogdns.org/archives/2009/12/mecabwikipediah.html | |
# 参考:http://mecab.sourceforge.net/ | |
require 'kconv' | |
origin="はてな" |
This file contains 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
# -*- coding: utf-8 -*- | |
# ひらがなかカタカナだけ | |
require 'kconv' | |
require 'pp' | |
title = $*[0] | |
tmp = title.tr('ぁ-ん','ァ-ン') | |
onsetsu = tmp.gsub(/リョ|リュ|リャ|ミョ|ミュ|ミャ|フォ|フェ|フィ|ファ|ピョ|ビョ|ヒョ|ピュ|ビュ|ヒュ|ピャ|ビャ|ヒャ|ニョ|ニュ|ニャ|ドゥ|トゥ|デュ|ディ|ティ|ツォ|ツェ|ツァ|チョ|チュ|チャ|チェ|ジョ|ショ|ジュ|シュ|ジャ|シャ|ジェ|シェ|ギョ|キョ|ギュ|キュ|ギャ|キャ|ウォ|ウィ/,"あ"); | |
pp onsetsu.length |
This file contains 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
./configure \ | |
--enable-mod-charset \ | |
--with-apxs2 \ | |
--without-iconv \ | |
--enable-fpm \ | |
--enable-mbstring \ | |
--enable-zip \ | |
--enable-soap \ | |
--with-mcrypt=$(brew --prefix libmcrypt) \ | |
--with-mysql \ |
This file contains 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
./configure \ | |
--enable-mod-charset \ | |
--with-apxs2=/usr/local/apache2/bin/apxs \ | |
--disable-cgi \ | |
--with-libexpat-dir=/usr \ | |
--with-libxml-dir=/usr \ | |
--with-openssl \ | |
--with-openssl-dir=$(brew --prefix openssl) \ | |
--with-kerberos \ | |
--with-zlib \ |
This file contains 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
// tpsは自分の好きな名前なんでも。ルートのパッケージ名的な。 | |
// geoは機能別に好きな名前なんでも。 | |
if ( typeof(tps) == 'undefined' ) tps = {}; | |
if ( typeof(tps.geo) == 'undefined' ) tps.geo = {}; | |
tps.geo.prototype = { | |
prop01:false, | |
prop02:false, | |
init : function () { | |
this.func01(); |
This file contains 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 | |
/sbin/service keepalived stop | |
/usr/sbin/tmpwatch -m 50 /usr/local/mysqlbackup/backupdata | |
svr_name=`uname -n` | |
/usr/bin/mysqladmin stop-slave | |
sleep 3 |
This file contains 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 | |
#### | |
#もしマスタが落ちたときの処理スクリプト | |
#とりあえず最終確認して、本当にダメだったらkeepalivedを落とす。 | |
#### | |
#ちょっと待つ | |
sleep 5 | |
#本当にmysqlが死んでいるかどうかの確認 | |
mysqlans=`mysql -u tbacojx -pdasuinzc -h 127.0.0.1 --port=3306 < /usr/local/keepscript/s | |
howmaster.sql | grep Bytes_received | awk '{print $1}'` |
This file contains 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 | |
/usr/sbin/tmpwatch -m 50 /usr/local/mysqlbackup/backupdata | |
svr_name=`uname -n` | |
/usr/bin/mysqladmin stop-slave | |
sleep 10 | |
/sbin/service mysqld stop | |
sleep 10 | |
daystr=`date -d '1 days ago' '+%Y%m%d'` | |
cd /var/lib/mysql | |
tar czvf /usr/local/mysqlbackup/backupdata/$svr_name$daystr.tgz ./* > /dev/null 2>&1 |
OlderNewer