Skip to content

Instantly share code, notes, and snippets.

View mazgi's full-sized avatar

Hidenori Matsuki mazgi

View GitHub Profile
@mazgi
mazgi / Gemfile.local
Last active August 29, 2015 14:01
Redmine on Gentoo with unicorn and nginx
gem 'unicorn'
@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 / 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 / console.md
Last active August 29, 2015 14:04
Btrfs is Great!
[root@baseimage] # ls -lh /var/log/zero.txt
-rw-r--r-- 1 root root 54G Jul 25 16:48 /var/log/zero.txt
[root@baseimage] # od -x /var/log/zero.txt
0000000 0000 0000 0000 0000 0000 0000 0000 0000
*
655206000000
[root@baseimage] # btrfs fi df /var/log
Data, single: total=5.01GiB, used=3.98GiB
System, DUP: total=8.00MiB, used=16.00KiB
@mazgi
mazgi / install.md
Last active August 29, 2015 14:04
ES3000 impression
@mazgi
mazgi / .gitignore
Last active August 29, 2015 14:05
Trial of fluent-plugin-secure-forward 0.1.9.pre.rc1
tool/
*-e
@mazgi
mazgi / console.md
Created September 4, 2014 01:16
td-agent riddle
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3             271G  151G  107G  59% /
tmpfs                  32G     0   32G   0% /dev/shm
/dev/sda1             494M   63M  407M  14% /boot
# du -k --max-depth=1 /var 2> /dev/null | sort -nr
55040808        /var
46549472        /var/log
# /etc/init.d/td-agent stop
@mazgi
mazgi / lftp.console.md
Last active August 29, 2015 14:11
lftp upload to sakura cloud
[mazgi@BRUICHLADDICH] $ lftp cdrom123456789012@sac-is1a-ssl.sakura.ad.jp
Password: 
lftp cdrom112500529931@sac-is1a-ssl.sakura.ad.jp:~> set ftp:passive-mode on
lftp cdrom112500529931@sac-is1a-ssl.sakura.ad.jp:~> set ftp:ssl-protect-data true
lftp cdrom112500529931@sac-is1a-ssl.sakura.ad.jp:~> put ~/Downloads/systemrescuecd-x86-4.4.1.iso 
413272064 bytes transferred in 40 seconds (9.85M/s)                                                           
lftp cdrom112500529931@sac-is1a-ssl.sakura.ad.jp:/> bye
@mazgi
mazgi / environment.md
Last active August 29, 2015 14:11
ownCloud on Gentoo
[root@owncloud-01] # uname -a
Linux owncloud-01 3.16.5-gentoo #1 SMP Wed Nov 26 10:56:25 2014 x86_64 Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz GenuineIntel GNU/Linux
[root@owncloud-01] # emerge -pvq nginx
[ebuild   R   ] www-servers/nginx-1.7.6  USE="aio http http-cache ipv6 pcre ssl vim-syntax -debug -libatomic -luajit -pcre-jit -rtmp (-selinux)" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi -addition -ajp -auth_pam -auth_request -cache_purge -dav -dav_ext -degradation -echo -fancyindex -flv -geoip -gunzip -gzip_static -headers_more -image_filter -lua -metrics -mogilefs -mp4 -naxsi -perl -push_stream -random_index -realip -secure_link -security -slowfs_cache -spdy -sticky -stub_status -sub -upload_progress -upstream_check -xslt" NGINX_MODULES_MAIL="-imap -pop3 -smtp" 
[root@owncloud-01] # emerge -pvq php
[ebuild   R   ] 
@mazgi
mazgi / environment.md
Last active August 29, 2015 14:13
Ruby on POWER8
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.5 (Santiago)
# uname -a
Linux S822n01l01 2.6.32-431.el6.ppc64 #1 SMP Sun Nov 10 22:17:43 EST 2013 ppc64 ppc64 ppc64 GNU/Linux