Skip to content

Instantly share code, notes, and snippets.

Avatar

Matsuki, Hidenori mazgi

View GitHub Profile
@mazgi
mazgi / 00.README.md
Last active Oct 23, 2020
is the zsh script being sourced?
View 00.README.md

is the zsh script being sourced?

a traditional way

[[ $_ = $0 ]] && {
  echo 'the script is being sourced.'
  return 0
} 
@mazgi
mazgi / 00.README.md
Last active Apr 5, 2020
fio benchmark results for btrfs raid
View 00.README.md
  • bs=4k
fio -rw=read -bs=4k -size=100m -numjobs=40 -runtime=60 -direct=1 -invalidate=1 -ioengine=libaio -iodepth=32 -iodepth_batch=32 -group_reporting -name=seqread
fio -rw=write -bs=4k -size=100m -numjobs=40 -runtime=60 -direct=1 -invalidate=1 -ioengine=libaio -iodepth=32 -iodepth_batch=32 -group_reporting -name=seqwrite
fio -rw=randread -bs=4k -size=100m -numjobs=40 -runtime=60 -direct=1 -invalidate=1 -ioengine=libaio -iodepth=32 -iodepth_batch=32 -group_reporting -name=randread
fio -rw=randwrite -bs=4k -size=100m -numjobs=40 -runtime=60 -direct=1 -invalidate=1 -ioengine=libaio -iodepth=32 -iodepth_batch=32 -group_reporting -name=randwrite
  • bs=32m
@mazgi
mazgi / Vagrantfile
Created Dec 13, 2016
My favorite Vagrantfile
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.define "ubuntu14" do |m|
m.vm.box = "ubuntu/trusty64"
View weechat.md
$ grep url ~/.weechat/script.conf
url = "https://weechat.org/files/plugins.xml.gz"
url_force_https = on
$ curl -LI 'https://weechat.org/files/plugins.xml.gz'
HTTP/1.1 200 OK
Date: Mon, 12 Dec 2016 11:47:32 GMT
Server: Apache
X-Frame-Options: sameorigin
X-Content-Type-Options: nosniff
@mazgi
mazgi / memo.md
Created Nov 29, 2016
Homebrew LFTP
View memo.md
$ pwd
/Users/hidenori.matsuki/Creations/mazgi/homebrew-core
$ git remote -v
origin	git@github.com:mazgi/homebrew-core.git (fetch)
origin	git@github.com:mazgi/homebrew-core.git (push)
$ git log -1
commit 21edd87ef66064af8860f7593696dda18c88ad43
Author: Hidenori MATSUKI <MATSUKI.Hidenori@gmail.com>
Date:   Tue Nov 29 12:09:36 2016 +0900
@mazgi
mazgi / console.md
Last active Feb 27, 2016
btrfs compression
View console.md
# uname -a
Linux test-04 4.1.15-gentoo-r1 #1 SMP Sat Feb 27 15:52:30 2016 x86_64 Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz GenuineIntel GNU/Linux
# btrfs --version
btrfs-progs v4.0.1
# gdisk -l /dev/vdb
GPT fdisk (gdisk) version 0.8.10
You can’t perform that action at this time.