Skip to content

Instantly share code, notes, and snippets.

query roots {
__schema {
queryType {
...typeFields
}
mutationType {
...typeFields
}
subscriptionType {
...typeFields

Keybase proof

I hereby claim:

  • I am nari-ex on github.
  • I am nari_ex (https://keybase.io/nari_ex) on keybase.
  • I have a public key ASBzSuF8RetAd5K8R3e9N4PgHCKvYurJFhoY6e9kJLG_lAo

To claim this, I am signing this object:

@nari-ex
nari-ex / install_mariadb10.0_and_maxscale1.2.txt
Last active October 21, 2015 04:07
Install mariadb v10.0 and maxscale v1.2
# yum install https://downloads.mariadb.com/enterprise/WY99-BC52/generate/10.0/mariadb-maxscale=1.2/mariadb-enterprise-repository.rpm
# yum install MariaDB-server MariaDB-client
# yum install maxscale
@nari-ex
nari-ex / rice_brand.json
Last active August 29, 2015 14:21
rice_brand
{
"brand": [
"夢ごこち",
"彩",
"初星",
"四国",
"春陽",
"朝日",
"秋晴",
"でわ75ひかり",
# dd で全部やるパターン
ionice -c3 dd if=/dev/zero of=100GB.img bs=1M count=102400 oflag=direct
ionice -c3 dd if=/dev/zero of=100GB.img bs=1M count=102400 oflag=sync
ionice -c3 dd if=/dev/zero of=100GB.img bs=1M count=102400 oflag=fdatasync
ionice -c3 dd if=/dev/zero of=100GB.img bs=1M count=102400 oflag=fsync
# 単位ファイルを作成して足し続けるパターン
ionice -c3 dd if=/dev/zero of=100MB.img bs=1M count=100 oflag=direct
for i in $(seq 1 1000); do ionice -c3 cat 100MB.img >> 100GB.img; sleep 5; done
# rsync コマンドを用いるケース
rsync -av --bwlimit 10000 src dst
# tar + pv コマンドを用いるケース
tar czvf - src | pv -L 2048k | cat - > /path/to/dist
find . -print -exec sleep 0.1 \; | xargs -n1 -I%% mv %% dst_dir/
find ./ -exec sleep 0.1 \; -delete -print
#/bin/bash
set -euo pipefail
filepath=$1
# 10MBytes/sec
filesize=$(du -m ${filepath} | awk '{print $1}')
sleep_time=0.1
for num in $(seq 1 ${filesize});
@nari-ex
nari-ex / rename.py
Created February 9, 2015 12:56
大量のファイルを移動するスクリプト
#!/usr/bin/env python
# coding: utf-8
import os
import time
src_dir = ""
dst_dir = ""
import_file = ""
export_file = ""