Skip to content

Instantly share code, notes, and snippets.

View mazgi's full-sized avatar

Hidenori "Hide" Matsuki mazgi

View GitHub Profile
@mazgi
mazgi / zookeeper.init.d.sh
Last active August 29, 2015 14:04
ZooKeeper on Gentoo
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
description="ZooKeeper daemon"
ZOOKEEPER_NAME="${SVCNAME##*.}"
if [ -n "${ZOOKEEPER_NAME}" -a "${SVCNAME}" != "zookeeper" ]; then
description="${description} for ${ZOOKEEPER_NAME}"
@mazgi
mazgi / phase1.sh.md
Last active August 29, 2015 14:02
#gentooinstallbattle automation

boot && network setting

create partitions

root@sysresccd /root % gdisk /dev/sda <<EOF
o
y
n
1
@mazgi
mazgi / Gemfile.local
Last active August 29, 2015 14:01
Redmine on Gentoo with unicorn and nginx
gem 'unicorn'
@mazgi
mazgi / fluentd.conf
Created May 23, 2014 12:19
fluentd with norikra
<source>
type forward
port 24224
</source>
<source>
type secure_forward
port 24284
shared_key secret
self_hostname collector.fluentd.example.com
@mazgi
mazgi / fluentd.conf.d.sh
Last active August 29, 2015 14:01
Fluentd init script for Gentoo
RBENV_VERSION="1.9.3-p545"
FLUENTD_EXEC="/var/lib/fluentd/.rbenv/shims/fluentd"
@mazgi
mazgi / rpiautoplayer.sh
Last active August 29, 2015 14:01
OMXPlayer auto start script
#!/bin/bash
set -e
READLINK=$(type -p greadlink readlink | head -1)
if [ -z "${READLINK}" ]; then
echo "[ERROR] Connot find readlink" >& 2
exit 1
fi
PLAYLIST_PATH="/media/playlist.txt"
@mazgi
mazgi / console.log
Created May 10, 2014 06:26
Avahi build error on Gentoo Linux on RPi
checking for intltool-extract... /usr/bin/intltool-extract
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/gmsgfmt
configure: error: GNU gettext tools not found; required for intltool
!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/net-dns/avahi-0.6.31-r2/work/avahi-0.6.31/config.log
* ERROR: net-dns/avahi-0.6.31-r2::gentoo failed (configure phase):
@mazgi
mazgi / modules
Created May 8, 2014 19:49
Gentoo MediaBox on RasberryPi
modules="snd_bcm2835"
modules="rt2800usb"
@mazgi
mazgi / Makefile
Created May 8, 2014 17:49
omxplayer
CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -
DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST -Wno-psabi
CFLAGS+=-lpthread
LDFLAGS+=-L./
LDFLAGS+=-Lffmpeg_compiled/usr/local/lib/
LDFLAGS+=-lc
LDFLAGS+=-lWFC
LDFLAGS+=-lGLESv2
LDFLAGS+=-lEGL
@mazgi
mazgi / iops.md
Last active August 29, 2015 13:58
Measure IOPSs on the Dell R420

Server

Storages & FileSystems

Gottfried ~ # fdisk -l /dev/sda

Disk /dev/sda: 599.6 GB, 599550590976 bytes, 1170997248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes