This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'benchmark' | |
gem 'dalli', '=1.0.2' | |
require 'dalli' | |
TEST_DATA_NUM = 100 | |
$memcached = Dalli::Client.new('127.0.0.1:11211') | |
# ベンチマークを計測する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'benchmark' | |
gem 'memcache', '=1.2.13' | |
require 'memcache' | |
TEST_DATA_NUM = 100 | |
$memcached = Memcache.new(:server => '127.0.0.1:11211') | |
# ベンチマークを計測する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
require 'fileutils' | |
require 'rubygems' | |
gem 'activesupport', '=2.3.11' | |
require 'active_support' | |
file_count = 0 | |
Dir::foreach('db/migrate') do |v| | |
next if v == "." or v == ".." or v == ".svn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### files to exclude from "cobbler import" commands that use | |
### rsync mirrors. by default ISOs, PPC code, and debug | |
### RPM's are not transferred. Some users may want to | |
### re-enable debug RPM's. | |
**/debug/** | |
**/alpha/** | |
**/source/** | |
**/SRPMS/** | |
**/*.iso | |
**/kde-i18n** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'optparse' | |
ENV['RAILS_ENV'] = ENV['RAILS_ENV'] || 'development' | |
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | |
opts = {} | |
ARGV.options {|opt| | |
opt.on('-s', '--save', 'save') {|v| opts[:save] = v } | |
opt.parse! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
184,185c184 | |
< NM=$($CMD create --quiet --dryrun --defconfig "$1" | | |
< sed -n 's/^.*(name \(.*\))$/\1/p') | |
--- | |
> NM=$(cat "$1" | sed -n 's/^.*<name>\(.*\)<\/name>$/\1/p') | |
286c285 | |
< shortdom=$(echo $dom | sed -n 's/^.*\/\(.*\)$/\1/p') | |
--- | |
> shortdom=$(echo $dom | sed -n 's/^.*\/\(.*\)\.xml$/\1/p') | |
291c290 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56c56 | |
< XENDOMAINS_SAVE=/var/lib/xen/save | |
--- | |
> XENDOMAINS_SAVE=" | |
89c89 | |
< XENDOMAINS_RESTORE=true | |
--- | |
> XENDOMAINS_RESTORE=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# stand-alone bash version of vdsm's ksm.py | |
# monitor system memory load and tune ksm accordingly | |
# | |
# needs testing and ironing. contact [email protected] if something breaks. | |
DEBUG=1 | |
KSMCTL="ksmctl" | |
KSM_MONITOR_INTERVAL=${KSM_MONITOR_INTERVAL:-60} | |
KSM_NPAGES_BOOST=${KSM_NPAGES_BOOST:-300} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for iface in /etc/sysconfig/network-scripts/ifcfg-eth*; do | |
iface_name=`egrep "^DEVICE=" $iface` | |
iface_no=${iface_name##DEVICE=eth} | |
iface_br=ifcfg-br${iface_no} | |
cp $iface $iface_br | |
sed -i -e "s/^DEVICE=eth${iface_no}/DEVICE=br${iface_no}/g" $iface_br | |
sed -i -e 's/^HWADDR=/#HWADDR=/g' $iface_br | |
echo "TYPE=Bridge" >> $iface_br | |
sed -i -e "s/^BOOTPROTO=/#BOOTPROTO=/g" $iface |