Skip to content

Instantly share code, notes, and snippets.

View glidenote's full-sized avatar

Akira Maeda glidenote

View GitHub Profile
#!/bin/bash
#
# ============================================================
#
# @license This program is free software.
#
# @category Script for Percona Server
# @project Gedow Software
# @package Gedow Percona Utils
# @author GedowFather http://blog.father.gedow.net/

Using strace and lsof to debug blocked processes

You can use strace on a specific pid to figure out what a specific process is doing, e.g.:

strace -fp <pid>

You might see something like:

select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)

@glidenote
glidenote / make-rpm.sh
Created July 4, 2012 01:54 — forked from riywo/make-rpm.sh
fluent-agent-liteのrpm作るだけのshell
#!/bin/sh
if [ -z "$1" ]; then
echo "usage: ./make-rpm.sh 0.2"
exit 1
fi
version=$1
cur=`pwd`
rm -f fluent-agent-lite.v$version.tar.gz
rm -fr fluent-agent-lite

ヒューマンエラーを許容する

  • 「きをつけよう」は意味ない
  • 実装、プラクティス、プロセスに落とし込む

バグ、ミスオペの混入を防ぐ

  • コードレビュー
  • 二人で作業
  • テストケース
@glidenote
glidenote / post-merge
Created May 29, 2012 07:48 — forked from hirochachacha/post-merge
git-hook script for vimproc
#!/bin/sh --
set -e
echo ""
echo "START POST-MERGE HOOK"
echo ""
HOOK_DIR=`dirname $0` #git_hooks directory
PROC_DIR="$HOOK_DIR/../.." #vimproc directory