Instantly share code, notes, and snippets.

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
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
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
View console.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=16k
View setup.sh
#!/bin/bash
set -e
DO_SETUP=false
function read_yes_or_no(){
echo -n "${1} [y/N] "
read YES_OR_NO
case ${YES_OR_NO^^} in
View gentoo.init.md
root@sysresccd /mnt/gentoo % grep -vE '^\s*(#|$)' etc/locale.gen 
en_US ISO-8859-1
en_US.UTF-8 UTF-8
ja_JP.EUC-JP EUC-JP
ja_JP.UTF-8 UTF-8
ja_JP EUC-JP
root@sysresccd /mnt/gentoo % grep -vE '^\s*(#|$)' etc/portage/make.conf
CFLAGS="-O2 -pipe"
CXXFLAGS="${CFLAGS}"
View console.md
$ ansible-playbook -i hosts playbook.yml

PLAY [test-servers] *********************************************************** 

GATHERING FACTS *************************************************************** 
ok: [172.x.y.1]

TASK: [example executed by root privilege with sudo] ************************** 
failed: [172.x.y.1] => {"failed": true, "parsed": false}