Skip to content

Instantly share code, notes, and snippets.

View youyo's full-sized avatar

Naoto Ishizawa youyo

View GitHub Profile
error: '__GMP_BITS_PER_MP_LIMB' undeclared (first use in this function)
$ patch -p0 -b < ../php-5.2.17.patch
patching file ext/dom/node.c
Hunk #1 succeeded at 1950 (offset 55 lines).
patching file ext/dom/documenttype.c
Hunk #1 succeeded at 215 (offset 10 lines).
patching file ext/simplexml/simplexml.c
Hunk #1 succeeded at 1343 (offset -74 lines).
@youyo
youyo / php52install
Last active February 10, 2016 06:00
$ cd /usr/local/src/
$ wget http://museum.php.net/php5/php-5.2.17.tar.gz
$ tar xvzf php-5.2.17.tar.gz
$ cd php-5.2.17
$ cp -a /usr/lib64/apr-1/build/libtool libtool
$ yum install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel curl curl-devel libjpeg libjpeg-devel \
libpng libpng-devel libXpm libXpm-devel freetype freetype-devel t1lib t1lib-devel gmp gmp-devel libmcrypt libmcrypt-devel \
libmhash libmhash-devel readline readline-devel net-snmp net-snmp-devel libtidy libtidy-devel libxslt libxslt-devel patch \
libtool-ltdl libtool-ltdl-devel
/usr/local/src/php-5.2.17/ext/dom/node.c: In function 'dom_canonicalization':
/usr/local/src/php-5.2.17/ext/dom/node.c:1953:21: error: dereferencing pointer to incomplete type
ret = buf->buffer->use;
^
In file included from /usr/local/src/php-5.2.17/main/php.h:38:0,
from /usr/local/src/php-5.2.17/ext/dom/node.c:26:
/usr/local/src/php-5.2.17/ext/dom/node.c:1955:40: error: dereferencing pointer to incomplete type
RETVAL_STRINGL((char *) buf->buffer->content, ret, 1);
^
/usr/local/src/php-5.2.17/Zend/zend_API.h:472:14: note: in definition of macro 'ZVAL_STRINGL'
#!/bin/bash -u
if [ $# -ne 11 ]; then
echo -e "Usage:\t${0} HOSTNAME PASSWORD VCPU MEMORY SWAP DISK IPADDRESS NETMASK GATEWAY OS-TYPE[centos6,centos7] NIC[1,2]"
exit 99
fi
HOSTNAME=${1?need hostname}
PASSWORD=${2?need password}
VCPU=${3?need vcpu}
#!/bin/bash -u
if [ $# -ne 9 ]; then
echo -e "Usage:\t${0} HOSTNAME PASSWORD VCPU MEMORY SWAP DISK IPADDRESS NETMASK GATEWAY"
exit 99
fi
HOSTNAME=${1?need hostname}
PASSWORD=${2?need password}
VCPU=${3?need vcpu}
#!/usr/bin/env ruby
require 'gruff'
require 'json'
require 'yajl'
require 'pp'
giops = Gruff::Line.new
giops.title = "IOPS Result (bs=4k)"
giops.x_axis_label = 'IO depth'
@youyo
youyo / fio.sh
Created February 23, 2015 11:40
#!/bin/bash -u
#BS=('4k' '16k' '1m')
#TYPE=('read' 'write' 'randread' 'randwrite')
#IODEPTH=(1 2 4 8 16 32 64)
BS=('4k')
TYPE=('read' 'write' 'randread' 'randwrite')
IODEPTH=(1 2 4 8 16 32 64)
OUTPUT='/tmp/fio.json'
BASE_CMD='fio -ioengine=libaio -direct=1 -invalidate=1 -filename=/tmp/fio.bin -size=10G -numjobs=1 -runtime=60 -group_reporting -name=fio --output-format=json'
#!/bin/bash -u
if [ $# -ne 9 ]; then
echo -e "Usage:\t${0} HOSTNAME PASSWORD VCPU MEMORY SWAP DISK IPADDRESS NETMASK GATEWAY"
exit 99
fi
HOSTNAME=${1?need hostname}
PASSWORD=${2?need password}
VCPU=${3?need vcpu}
@youyo
youyo / .vimrc
Created February 12, 2013 11:45
syntax on
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8,iso-2022-jp,euc-jp,ucs-2,cp932,sjis
set tabstop=2
set autoindent
set expandtab
set shiftwidth=2
set ignorecase
set showmatch