Skip to content

Instantly share code, notes, and snippets.

View nekoruri's full-sized avatar
🤔
にゃーん

@nekoruri nekoruri

🤔
にゃーん
View GitHub Profile
@nekoruri
nekoruri / redis_bgsave.sh
Last active December 21, 2015 02:59
RedisのBGSAVEコマンドを実行し、LASTSAVEが更新されるのを待つ。 タイムアウト時間を超えたら exit status 1 で終了する。
#!/bin/bash
# RedisのBGSAVEコマンドを実行し、LASTSAVEが変わる(=dump.rdbが更新される)のを待つ。
# タイムアウト時間を超えたら exit status 1 で終了する。
TIMEOUT=30
# Timeout handler
# http://stackoverflow.com/questions/1226094/how-to-include-a-timer-in-bash-scripting
set_timer() {
@nekoruri
nekoruri / class.cchart.php.diff
Last active December 20, 2015 13:19
Zabbixのグラフで日付表示時に時刻を省略して縦幅を縮めるパッチ。Zabbix 2.0.6 にて動作確認済み。 /usr/share/zabbix とかに行って patch -p0 で食わせてください。
--- include/classes/class.cchart.php.orig 2013-08-02 07:55:09.131739793 +0000
+++ include/classes/class.cchart.php 2013-08-02 07:58:21.199739718 +0000
@@ -34,7 +34,7 @@
$this->skipRightScale = 0; // in case if right axis should be drawn but doesn't contain any data
$this->ymin_itemid = 0;
$this->ymax_itemid = 0;
- $this->legendOffsetY = 90;
+ $this->legendOffsetY = 50;
$this->percentile = array(
'left' => array(
# Example configuration file for Munin, generated by 'make build'
# The next three variables specifies where the location of the RRD
# databases, the HTML output, logs and the lock/pid files. They all
# must be writable by the user running munin-cron. They are all
# defaulted to the values you see here.
#
#dbdir /var/lib/munin
#htmldir /var/www/html/munin
#logdir /var/log/munin
apt-get update
apt-get -y install apache2 rrdtool librrds-perl libcgi-fast-perl libdate-manip-perl \
libfile-copy-recursive-perl libhtml-template-perl libio-socket-inet6-perl \
liblog-log4perl-perl liburi-perl ttf-dejavu
wget \
http://ftp.jp.debian.org/debian-backports/pool/main/m/munin/munin_2.0.6-3~bpo60+1_all.deb \
http://ftp.jp.debian.org/debian-backports/pool/main/m/munin/munin-common_2.0.6-3~bpo60+1_all.deb
dpkg -i munin*.deb
ufw allow Apache
rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install munin httpd
chkconfig httpd on
service httpd restart
apt-get update
apt-get -y install gawk libnet-server-perl liblist-moreutils-perl libcache-cache-perl
wget \
http://ftp.jp.debian.org/debian-backports/pool/main/m/munin/munin-common_2.0.6-3~bpo60+1_all.deb \
http://ftp.jp.debian.org/debian-backports/pool/main/m/munin/munin-node_2.0.6-3~bpo60+1_all.deb \
http://ftp.jp.debian.org/debian-backports/pool/main/m/munin/munin-plugins-core_2.0.6-3~bpo60+1_all.deb \
http://ftp.jp.debian.org/debian-backports/pool/main/m/munin/munin-plugins-extra_2.0.6-3~bpo60+1_all.deb
dpkg -i munin*.deb
rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum -y install munin-node perl-Cache-Cache
chkconfig munin-node on
service munin-node start
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2013-03-22T04:14:28Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
http://sp.pf.mbga.jp/12008305/
?guid=ON
&url=http%3A%2F%2F125.6.169.35%2Fidolmaster%2Ferror%2F%3Fmsg%3DActiveRecord%253A%253Asimple_query%2B%253E%253E%2Bno%2Bresult%2Bsql%2B-%253E%2BSELECT%2BCOUNT%2528%252A%2529%2BAS%2B%2560numrows%2560%250AFROM%2B%2560user_friend%2560%250AWHERE%2B%2560viewer_id%2560%2B%253D%2B%2527なんちゃら%2527%250AAND%2B%2560state%2560%2B%253D%2B2%250AAND%2B%2560delete_time%2560%2BIS%2BNULL%26l_frm%3DMypage_1%26rnd%3D330925538
http://sp.pf.mbga.jp/12008305/
?guid=ON
&url=http://125.6.169.35/idolmaster/error/
?msg=ActiveRecord%3A%3Asimple_query+%3E%3E+no+result+sql+-%3E+SELECT+COUNT%28%2A%29+AS+%60numrows%60%0AFROM+%60user_friend%60%0AWHERE+%60viewer_id%60+%3D+%27なんちゃら%27%0AAND+%60state%60+%3D+2%0AAND+%60delete_time%60+IS+NULL
@nekoruri
nekoruri / vim_risk.md
Last active December 14, 2015 09:19 — forked from repeatedly/d_risk.md

ついに顕在化しはじめた「vimリスク」

英語圏ではかなり前からvimで開発し続けることのリスクについて語られていたが、いよいよ具体的な弊害が出て来ているようなので、かいつまんでメモ。日本でもそう遠くない未来だと思う。

若手エンジニアの不足

Visual Studioのように需要が逼迫しているのに人材の供給が増えず需給ミスマッチが起っているわけでは無く、需要も供給も減るという状況下でわずかだが需要が上回っているとう性質の悪い状況がvimに起きている。特に深刻なのは安価な若手エンジニアの採用が絶望的に難しいという現実だ。TextMateが台頭して数年経ちXcodeがメインストリームの先頭を突っ走る2013年において新しくvimを勉強しようとする若者はよほどの物好きしかいない。30~40歳のvimエンジニアを雇うのはそれほど難しく無いだろうがコストがかかる。安価な20代前半の若手エンジニアを雇いたいという企業の思いとは裏腹にvimを新たに学ぶ若者は絶滅寸前だ。

とても優秀な若者を雇用できるチャンスが巡って来た。採用担当者はこう尋ねる。「vimは習得していますか?」「もちろんEclipse/NetBeans/Xcodeはお手の物です。IntelliJもある程度可能です」「もう一度伺いますがvimは習得していますか?」「申し訳ございません 未習得です」