Skip to content

Instantly share code, notes, and snippets.

Avatar

Matsuki, Hidenori mazgi

View GitHub Profile
@mazgi
mazgi / conf.d.sh
Last active Aug 29, 2015
RACK App on Gentoo
View conf.d.sh
rc_ulimit="-n 65535"
rc_need="nginx"
RACK_DIR="/var/lib/rack/versions/current"
RACK_BUNDLE_EXEC="/usr/local/bin/bundle"
RACK_RB="/var/lib/rack/versions/current/config/unicorn.rb"
@mazgi
mazgi / environment.md
Last active Aug 29, 2015
Ruby on POWER8
View environment.md
# 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
@mazgi
mazgi / client.md
Last active Aug 24, 2018
LDAP on Gentoo
View client.md
# emerge -pvq sssd openldap sudo openssh
[ebuild   R   ] net-nds/openldap-2.4.38-r2  USE="berkdb crypt gnutls ipv6 minimal sasl ssl syslog tcpd -cxx -debug -experimental -icu -iodbc -kerberos -odbc -overlays -perl -samba (-selinux) -slp -smbkrb5passwd" ABI_X86="(64) -32 (-x32)" 
[ebuild   R   ] net-misc/openssh-6.7_p1  USE="hpn pam pie -X -X509 -bindist -kerberos -ldap -ldns -libedit -sctp (-selinux) -skey -static" 
[ebuild   R   ] sys-auth/sssd-1.12.1  USE="ssh sudo -acl -augeas -autofs -locator -manpages -netlink -nfsv4 -nls -python (-selinux) {-test}" PYTHON_TARGETS="python2_7" 
[ebuild   R   ] app-admin/sudo-1.8.12  USE="ldap nls pam sendmail -offensive (-selinux) -skey" 
# < /etc/sssd/sssd.conf
@mazgi
mazgi / environment.md
Last active Aug 29, 2015
ownCloud on Gentoo
View environment.md
[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 / lftp.console.md
Last active Aug 29, 2015
lftp upload to sakura cloud
View lftp.console.md
[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 / console.md
Created Sep 4, 2014
td-agent riddle
View console.md
# 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 / NEW QGROUP!.md
Last active Dec 23, 2017
Btrfs subvolume quota
View NEW QGROUP!.md
[root@btrfs-testdrive] # btrfs qgroup create 1/100 /mnt/btrfs
[root@btrfs-testdrive] # btrfs qgroup assign 0/276 1/100 /mnt/btrfs
[root@btrfs-testdrive] # btrfs qgroup show /mnt/btrfs
qgroupid rfer       excl       
-------- ----       ----       
0/5      16384      16384      
0/256    2864136192 2864136192 
0/258    833703936  833703936  
0/259    52510720   52510720   
@mazgi
mazgi / .gitignore
Last active Aug 29, 2015
Trial of fluent-plugin-secure-forward 0.1.9.pre.rc1
@mazgi
mazgi / install.md
Last active Aug 29, 2015
ES3000 impression
View install.md
@mazgi
mazgi / console.md
Last active Aug 29, 2015
Btrfs is Great!
View console.md
[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