Skip to content

Instantly share code, notes, and snippets.

MATSUKI Hidenori mazgi

Block or report user

Report or block mazgi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mazgi
mazgi / install_playframeworks_for_playenv.sh
Last active Aug 29, 2015
Install Scala, sbt, PlayFramefork for {scala,sbt,play}env.
View install_playframeworks_for_playenv.sh
#!/bin/bash
for version in 2.2.1 2.2.0 2.1.5 2.1.4 2.1.3 2.1.2 2.1.1 2.1.0 2.0.8 2.0.7 2.0.6 2.0.5 2.0.4 2.0.3 2.0.2 2.0.1 2.0 1.2.7 1.2.6 1.2.5.3 1.2.5.2 1.2.5.1 1.2.5
do
mkdir -p ~/.playenv/versions && pushd ~/.playenv/versions > /dev/null
if [ -d play-${version} ]; then
echo "Play ${version} is already installed."
else
echo "Installing Play ${version}..."
stat=$(($(curl -LI http://downloads.typesafe.com/play/${version}/play-${version}.zip -o /dev/null -w '%{http_code}\n' -s)/100*100))
if [ 200 -eq ${stat} ]; then
View randomread.fio
[global]
ioengine=libaio
direct=1
invalidate=1
group_reporting
filename=test.bin
runtime=60
[Rand-Read-4k-qd32]
readwrite=randread
@mazgi
mazgi / gist:9972940
Created Apr 4, 2014
HDD benchmark with fio
View gist:9972940
fio -filename=/path/to/fio.bin -direct=1 -invalidate=1 -rw=randwrite -bs=4k -size=4G -numjobs=64 -runtime=180 -group_reporting -name=file1
@mazgi
mazgi / iops.md
Last active Aug 29, 2015
Measure IOPSs on the Dell R420
View iops.md

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
@mazgi
mazgi / modules
Created May 8, 2014
Gentoo MediaBox on RasberryPi
View modules
modules="snd_bcm2835"
modules="rt2800usb"
View Makefile
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 / console.log
Created May 10, 2014
Avahi build error on Gentoo Linux on RPi
View console.log
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 / rpiautoplayer.sh
Last active Aug 29, 2015
OMXPlayer auto start script
View rpiautoplayer.sh
#!/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 / fluentd.conf.d.sh
Last active Aug 29, 2015
Fluentd init script for Gentoo
View fluentd.conf.d.sh
RBENV_VERSION="1.9.3-p545"
FLUENTD_EXEC="/var/lib/fluentd/.rbenv/shims/fluentd"
@mazgi
mazgi / fluentd.conf
Created May 23, 2014
fluentd with norikra
View fluentd.conf
<source>
type forward
port 24224
</source>
<source>
type secure_forward
port 24284
shared_key secret
self_hostname collector.fluentd.example.com
You can’t perform that action at this time.