Skip to content

Instantly share code, notes, and snippets.

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

@nekoruri nekoruri

🤔
にゃーん
View GitHub Profile
# 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
@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(
@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 / もう那珂ちゃんのファンやめたい
Last active January 1, 2016 10:19
もう那珂ちゃんのファンやめたい
http://anond.hatelabo.jp/20131226111627
艦隊これくしょんはじめたんだけど、
希望の編成と違う艦ばかりドロップしてて、げんなりしている。
うちは空母狙いで、秘書艦とも良好な関係築けて
赤城さんが入渠中でこれから瑞鶴も入渠しようとしているから
活躍できるような空母つくろうって燃えてたんだけど、
建造したらおかしなことになった。
@nekoruri
nekoruri / live.md
Created January 21, 2016 03:11
参加ライブ一覧

#参加ライブ一覧

2015年

  • 01/10 LiSA LiVE is Smile Alwayas ~PiNK&BLACK~ いちごドーナツ 日本武道館
  • 01/11 LiSA LiVE is Smile Alwayas ~PiNK&BLACK~ ちょこドーナツ 日本武道館
  • 01/17 NANA MIZUKI アコースティックLIVE さいたまスーパーアリーナ
  • 01/18 NANA MIZUKI アコースティックLIVE さいたまスーパーアリーナ
  • 01/24 リスアニ!LIVE-5 -SATURDAY STAGE- 日本武道館
  • 01/25 ニッポン放送 LIVE EXPO TOKYO 2015 ミューコミ+プレゼンツ アニメ紅白歌合戦 Vol.4 国立代々木競技場 第一体育館
@nekoruri
nekoruri / kancolle_2016winter_e-3.md
Last active February 24, 2016 11:09
艦これ 2016冬イベント E-3攻略
回数 試行日 判定 撃破回数 メモ
1 02/23 大破撤退(隼鷹)
2 02/23 C敗北 0.28 制空値全然見てなかった
3 02/23 S勝利 1.28
4 02/23 大破撤退(隼鷹) 1.28
5 02/23 A勝利(ボス撃破) 2.28
6 02/23 A勝利(ボス無傷) 2.28
7 02/23 A勝利 2.44
@nekoruri
nekoruri / mu_domain_mapping_utf8mb4.patch
Created May 17, 2016 14:10
utf8mb4 support for WordPress MU Domain Mapping
Index: domain_mapping.php
===================================================================
--- domain_mapping.php (revision 1418770)
+++ domain_mapping.php (working copy)
@@ -98,7 +98,7 @@
$wpdb->query( "CREATE TABLE IF NOT EXISTS `{$wpdb->dmtable}` (
`id` bigint(20) NOT NULL auto_increment,
`blog_id` bigint(20) NOT NULL,
- `domain` varchar(255) NOT NULL,
+ `domain` varchar(191) NOT NULL,
#!/bin/sh
SERVER=$1
PORT=$2
TIMEOUT=25
PATH=/bin:/usr/bin; export PATH
basedir=`dirname $0`
$basedir/timeout $TIMEOUT $basedir/ssl-cert-check -s $SERVER -p $PORT -n | sed 's/ */ /g' | cut -f6 -d" " | sed 's/^.*=//g'
@nekoruri
nekoruri / commonfunc.sh
Last active January 5, 2017 02:41
よく使いそうなbash関数
# DEBUG付いてるときだけデバッグ出力
function debug() { ((DEBUG)) && echo "$*"; }
# タイムスタンプ付き出力
function ts() { echo $(date +'%Y/%m/%d %H:%M:%S')" $1"; }
# タイムスタンプ付きデバッグ出力
function debugts() { debug $(date +'%Y/%m/%d %H:%M:%S')" $1"; }
# ディレクトリの絶対パス
@nekoruri
nekoruri / Workshop.md
Created November 2, 2017 11:14 — forked from shundy/Workshop.md
Serverless Workshop

Event Gateway

Node のインストール

brew install nodebrew
echo 'export PATH=$PATH:$HOME/.nodebrew/ current/bin' >> ~/.bash_profile
mkdir -p ~/.nodebrew/src
nodebrew install-binary v6.11.5