Skip to content

Instantly share code, notes, and snippets.

View rkmathi's full-sized avatar
🐈

Ryuichi KAWAMATA rkmathi

🐈
View GitHub Profile
@rkmathi
rkmathi / C
Last active August 29, 2015 14:23
$ sudo dtruss
$ sudo dtruss ./a.out > /dev/null
this is text file.
SYSCALL(args) = return
thread_selfid(0x0, 0x0, 0x0) = 1704016 0
open(".\0", 0x0, 0x1) = 3 0
fstat64(0x3, 0x7FFF5F10AEB0, 0x1) = 0 0
fcntl(0x3, 0x32, 0x7FFF5F10B1A0) = 0 0
close(0x3) = 0 0
stat64("/Users/rkmathi/tmp/ruby/two_rank_down\0", 0x7FFF5F10AE20, 0x7FFF5F10B1A0) = 0 0
@rkmathi
rkmathi / Ruby
Created June 28, 2015 09:58
$ sudo dtruss -p70682
$ sudo dtruss -p70682
SYSCALL(args) = return
sigprocmask(0x1, 0x0, 0x7FFF5E37AA60) = 0x0 0
sigaltstack(0x0, 0x7FFF5E37AA50, 0x7FFF5E37AA60) = 0 0
open("./TEXT.txt\0", 0x1000000, 0x1B6) = 7 0
ioctl(0x7, 0x4004667A, 0x7FFF5E37AB5C) = -1 Err#25
ioctl(0x7, 0x40487413, 0x7FFF5E37AB60) = -1 Err#25
sigprocmask(0x1, 0x0, 0x7FFF5E37AB20) = 0x0 0
sigaltstack(0x0, 0x7FFF5E37AB10, 0x7FFF5E37AB20) = 0 0
read(0x7, "this is text file.\n\0", 0x14) = 19 0
@rkmathi
rkmathi / make.conf
Last active September 27, 2015 20:28
/etc/make.conf for X201s
### /etc/make.conf
# For GentooLinux on X201s
CFLAGS="-march=core2 -O2 -fomit-frame-pointer -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j -l4"
FEATURES="ccache parallel-fetch metadata-transfer"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="4G"
@rkmathi
rkmathi / make.conf
Last active September 30, 2015 16:28
/etc/portage/make.conf for "Sakura VPS(v3) 2G"
# For Gentoo/Linux on Sakura VPS(v3) 2G
CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
FFLAGS="${CFLAGS}"
FCFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
MAKEOPTS="-j4"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
@rkmathi
rkmathi / gist:2603186
Created May 5, 2012 15:14
virt-install
# virt-install --connect qemu:///system --hvm --os-type=Linux \
--name nrt \
--ram=4096 --disk=/var/lib/libvirt/images/nrt.img \
--cdrom=/var/lib/libvirt/images/install-amd64-minimal-20120223.iso \
--network bridge=br0 \
--vnc --vncport 5900 \
--extra-args='console=tty0 console=tty0,11520n8'
@rkmathi
rkmathi / $ emerge -avD @okkake
Created July 1, 2012 10:59
/etc/portage/sets/okkake
$ emerge -avD @okkake
WARNING: One or more repositories have missing repo_name entries:
/home/rkmathi/rep/gh/rkmathi-overlay/profiles/repo_name
NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.
@rkmathi
rkmathi / .config
Created October 23, 2012 00:33
gentoo-sources-3.12.2 .config for Sakura VPS
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.12.2-gentoo Kernel Configuration
#
#
# Gentoo Linux
#
CONFIG_GENTOO_LINUX=y
CONFIG_GENTOO_LINUX_UDEV=y
@rkmathi
rkmathi / 20-thinkpad.conf
Created October 28, 2012 05:40
/usr/share/X11/xorg.conf.d/20-thinkpad.conf
Section "InputClass"
Identifier "Trackpoint Wheel Emulation"
MatchProduct "TrackPoint"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "Emulate3Buttons" "false"
Option "XAxisMapping" "6 7"
Option "YAxisMapping" "4 5"
@rkmathi
rkmathi / deploy.rb
Created December 5, 2012 15:24
http://blog.has-key.org/208 - 4. デプロイの準備
require "capistrano_colors"
require "bundler/capistrano"
# RVM settings
# $:.unshift(File.expand_path("./lib", ENV["rvm_path"]))
require "rvm/capistrano"
set :rvm_type, :user
set :rvm_ruby_string, "1.9.3"
# Repository settings