Skip to content

Instantly share code, notes, and snippets.

View higebu's full-sized avatar
🏠
Working from home

Yuya Kusakabe higebu

🏠
Working from home
View GitHub Profile
@higebu
higebu / get_loaded_extensions.log
Created December 27, 2013 06:08
hhvm -v "Eval.EnableZendCompat = true" get_loaded_extensions.php
Array
(
[0] => apc
[1] => bcmath
[2] => bz2
[3] => ctype
[4] => curl
[5] => date
[6] => dom
[7] => exif
#!/bin/bash
yum groupinstall "Development tools"
yum install zlib-devel
yum install bzip2-devel openssl-devel ncurses-devel
wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar xf Python-2.7.6.tgz
cd Python-2.7.6
./configure --prefix=/usr/local
make && make altinstall
@higebu
higebu / vpnserver
Created March 10, 2014 06:05
SoftEther VPN Server init script for Debian
#!/bin/sh
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: SoftEther VPN Server
### END INIT INFO
diff -u -r zabbix-2.2.2.orig/src/zabbix_server/vmware/vmware.c zabbix-2.2.2/src/zabbix_server/vmware/vmware.c
--- zabbix-2.2.2.orig/src/zabbix_server/vmware/vmware.c 2014-02-12 18:04:36.000000000 +0900
+++ zabbix-2.2.2/src/zabbix_server/vmware/vmware.c 2014-03-28 13:51:08.285732065 +0900
@@ -1944,9 +1944,22 @@
"</ns0:RetrievePropertiesEx>" \
ZBX_POST_VSPHERE_FOOTER
+# define ZBX_POST_VCENTER_HV_LIST_CONTINUE \
+ ZBX_POST_VSPHERE_HEADER \
+ "<ns0:ContinueRetrievePropertiesEx xsi:type=\"ns0:ContinueRetrievePropertiesExRequestType\">" \
diff -u -r zabbix-2.2.2.orig/database/mysql/schema.sql zabbix-2.2.2/database/mysql/schema.sql
--- zabbix-2.2.2.orig/database/mysql/schema.sql 2014-02-12 18:07:45.000000000 +0900
+++ zabbix-2.2.2/database/mysql/schema.sql 2014-03-28 14:01:21.892152182 +0900
@@ -38,7 +38,7 @@
`jmx_available` integer DEFAULT '0' NOT NULL,
`jmx_errors_from` integer DEFAULT '0' NOT NULL,
`jmx_error` varchar(128) DEFAULT '' NOT NULL,
- `name` varchar(64) DEFAULT '' NOT NULL,
+ `name` varchar(128) DEFAULT '' NOT NULL,
`flags` integer DEFAULT '0' NOT NULL,
@higebu
higebu / unittest-discover-does-not-work
Created April 6, 2014 05:40
'python -m unittest discover' does not work
% python -m unittest discover
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
2014/04/12 16:47:18 reconnecting to TCP connection for SSH
2014/04/12 16:47:18 handshaking with SSH
2014/04/12 16:47:18 server got *ssh.kexInitMsg &{[138 50 254 99 19 130 12 216 249 62 92 107 179 1 121 249] [ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 diffie-hellman-group14-sha1 diffie-hellman-group1-sha1] [ssh-rsa-cert-v01@openssh.com ssh-dss-cert-v01@openssh.com ecdsa-sha2-nistp256-cert-v01@openssh.com ecdsa-sha2-nistp384-cert-v01@openssh.com ecdsa-sha2-nistp521-cert-v01@openssh.com ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521 ssh-rsa ssh-dss] [aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com arcfour256 arcfour128] [aes128-ctr aes192-ctr aes256-ctr aes128-gcm@openssh.com arcfour256 arcfour128] [hmac-sha1 hmac-sha1-96] [hmac-sha1 hmac-sha1-96] [none] [none] [] [] false 0} (<nil>)
2014/04/12 16:47:18 server entered key exchange
2014/04/12 16:47:18 client got *ssh.kexInitMsg &{[107 66 169 30 193 212 26 78 72 25 122 217 123 78 8 98] [ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-
@higebu
higebu / vmware-esx.sh
Last active August 29, 2015 14:00
The script to install the VMware Tools
sudo mount -o loop /dev/cdrom /mnt
tar zxf /mnt/VMwareTools-*.tar.gz -C /tmp/
sudo /tmp/vmware-tools-distrib/vmware-install.pl -d
sudo umount /mnt
@higebu
higebu / gist:89cf1ce0d2c58f117625
Created May 3, 2014 06:37
vim-cmd vmsvc/power.on: certificate error
/vmfs/volumes/53646144-48e55ffe-387a-000c298b3024/output-vmware-iso # vi
m-cmd -d verbose vmsvc/power.on 3
2014-05-03T06:12:56.056Z [FFA745B0 info 'Default'] Logging uses fast path: true
2014-05-03T06:12:56.056Z [FFA745B0 info 'Default'] Handling bora/lib logs with VmaCore facilities
2014-05-03T06:12:56.056Z [FFA745B0 info 'Default'] Initialized channel manager
2014-05-03T06:12:56.057Z [FFA745B0 info 'Default'] Current working directory: /vmfs/volumes/53646144-48e55ffe-387a-000c298b3024/output-vmware-iso
2014-05-03T06:12:56.057Z [FFAD7B70 info 'ThreadPool'] Thread enlisted
2014-05-03T06:12:56.058Z [FFA745B0 info 'ThreadPool'] Thread pool on asio: Min Io, Max Io, Min Task, Max Task, Max Concurency: 2, 200, 2, 10, 2147483647
2014-05-03T06:12:56.058Z [FFA745B0 info 'ThreadPool'] Thread enlisted
2014-05-03T06:12:56.059Z [FFB18B70 info 'ThreadPool'] Thread enlisted
@higebu
higebu / gist:449a0e16000b15a49670
Created May 3, 2014 07:19
vim-cmd vmsvc/power.on: error
/vmfs/volumes/53646144-48e55ffe-387a-000c298b3024 # vim-cmd -d trivia vm
svc/power.on 3
2014-05-03T07:18:15.799Z [FFD165B0 info 'Default'] Logging uses fast path: true
2014-05-03T07:18:15.799Z [FFD165B0 info 'Default'] Handling bora/lib logs with VmaCore facilities
2014-05-03T07:18:15.799Z [FFD165B0 info 'Default'] Initialized channel manager
2014-05-03T07:18:15.800Z [FFD165B0 info 'Default'] Current working directory: /vmfs/volumes/53646144-48e55ffe-387a-000c298b3024
2014-05-03T07:18:15.801Z [FFD79B70 info 'ThreadPool'] Thread enlisted
2014-05-03T07:18:15.801Z [FFDBAB70 info 'ThreadPool'] Thread enlisted
2014-05-03T07:18:15.801Z [FFDFBB70 info 'ThreadPool'] Thread enlisted
2014-05-03T07:18:15.802Z [FFE3CB70 info 'ThreadPool'] Thread enlisted