Skip to content

Instantly share code, notes, and snippets.

View eru's full-sized avatar
🍺
🍻

Kazuki Hashimoto eru

🍺
🍻
View GitHub Profile
#!/bin/sh
## VMware Workstation 12.1.0.3272444
## kernel: 4.3.5-300.fc23.x86_64
cd /usr/lib/vmware/modules/source
find . -type f -name \*.tar -exec cp {}{,.orig} \;
find . -type f -name \*.tar -exec tar xf {} \;
curl -O https://communities.vmware.com/servlet/JiveServlet/download/2576100-151611/b-c.patch.zip && \
unzip b-c.patch.zip && rm -f b-c.patch.zip
##
## メンテナンスモード用コンフィグ
##
## How to use:
## maintenance mode on
## $ rename .conf .conf.maintenance *.conf && rename .conf.tmp .conf *.conf.tmp && service nginx restart
## maintenance mode off
## $ rename .conf .conf.tmp *.conf && rename .conf.maintenance .conf *.conf.maintenance && service nginx restart
##
## Tips:
##
## メンテナンスモード用コンフィグ
##
## How to use:
## maintenance mode on
## $ rename .conf .conf.maintenance *.conf && rename .conf.tmp .conf *.conf.tmp && service httpd restart
## maintenance mode off
## $ rename .conf .conf.tmp *.conf && rename .conf.maintenance .conf *.conf.maintenance && service httpd restart
##
## Tips:
#!/bin/sh
# check root and set MY_YUM
MY_YUM="sudo yum"
if [ ${EUID:-${UID}} = 0 ]; then
MY_YUM="yum"
fi
# remove exists git package
eval ${MY_YUM} erase -y git
#!/bin/sh
## VMware Workstation 12
## kernel: 4.2.5-300.fc23.x86_64
cd /usr/lib/vmware/modules/source
cp vmblock.tar{,.orig}
tar xvf vmblock.tar
cd vmblock-only
curl -O https://gist.githubusercontent.com/eru/f3352e728d6661491462/raw/be1c373c3a4e6032e54b12e9075fafc88cd48a0c/vmblock.patch
diff --git linux/control.c linux/control.c
index 79716bd..2815f4f 100644
--- linux/control.c
+++ linux/control.c
@@ -208,9 +208,11 @@ SetupProcDevice(void)
VMBlockSetProcEntryOwner(controlProcMountpoint);
/* Create /proc/fs/vmblock/dev */
- controlProcEntry = create_proc_entry(VMBLOCK_CONTROL_DEVNAME,
- VMBLOCK_CONTROL_MODE,
#!/bin/sh
#####
# This script for CentOS 6.x
# 2015.10.13 Kazuki Hashimoto <eru.tndl@gmail.com>
#
# ref: http://usafusa.com/postgresqlpostfixpostfix-admin/
# ref: http://qiita.com/4486/items/62cfc7ab46e6c5add425
#####
# CentOS-Source.repo
#
# Please replace $full_releasever to N.N
# e.g.
# sed -i -e 's/$full_releasever/6.7/g' CentOS-Source.repo
[base-src]
name=CentOS-$releasever - Base Source
baseurl=http://vault.centos.org/$full_releasever/os/Source/
gpgcheck=1
#!/bin/sh
# パッケージ作成に必要な物をインストール
yum install -y wget rpmdevtools tar mysql-devel httpd-devel ImageMagick-devel gcc-c++ libtool openssl-devel libmemcached-devel
# ビルド用ディレクトリの作成
rpmdev-setuptree
# ビルド用のソースディレクトリへ移動
cd ~/rpmbuild/SOURCES
@eru
eru / mod_chxj.spec
Last active September 23, 2015 09:58
%define version 0.14.1
Summary: CHTML to HDML,XHTML,JHTML convert module for Apache HTTPD.
Name: mod_chxj
Version: %{version}
Release: 1
License: Apache License Version 2.0
Group: System Environment/Daemons
Vendor: Atsushi Konno
URL: http://sourceforge.jp/projects/modchxj/