This file contains hidden or 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
--- rubygems-1.8.5/lib/rubygems/remote_fetcher.rb.orig 2011-07-20 00:28:13.000000000 +0900 | |
+++ rubygems-1.8.5/lib/rubygems/remote_fetcher.rb 2011-07-20 01:09:59.000000000 +0900 | |
@@ -69,6 +69,7 @@ | |
when URI::HTTP then proxy | |
else URI.parse(proxy) | |
end | |
+ @no_proxy = (ENV['NO_PROXY'] || ENV['no_proxy'] || 'localhost, 127.0.0.1').split(/\s*,\s*/) | |
@user_agent = user_agent | |
end | |
This file contains hidden or 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
# -*- encoding: utf-8 -*- | |
namespace :setup do | |
def copy_config(options = {}) | |
Dir["#{RAILS_ROOT}/**/*.sample", "#{RAILS_ROOT}/**/*.example"].each do |source| | |
target = source.sub(/\.(ex|s)ample$/, '') | |
if options[:force] or not File.exist?(target) | |
require 'fileutils' | |
puts "Create config file '#{target}' from '#{source}'" | |
FileUtils.copy_file source, target |
This file contains hidden or 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
$ sudo easy_install webcolors Searching for webcolors | |
Reading http://cheeseshop.python.org/pypi/webcolors/ | |
Reading http://www.bitbucket.org/ubernostrum/webcolors/overview/ | |
error: Download error: (-2, 'Name or service not known') | |
exit 1 | |
$ sudo easy_install http://pypi.python.org/packages/source/w/webcolors/webcolors-1.3.1.tar.gz | |
Downloading http://pypi.python.org/packages/source/w/webcolors/webcolors-1.3.1.tar.gz | |
Processing webcolors-1.3.1.tar.gz | |
Running webcolors-1.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-HXFg3s/webcolors-1.3.1/egg-dist-tmp-hw4BbL |
This file contains hidden or 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
$ sudo yum install freetype freetype-devel libpng libpng-devel # for PIL | |
$ sudo yum install python-setuptools fonts-japanese | |
$ sudo easy_install PIL funcparserlib | |
$ sudo easy_install http://pypi.python.org/packages/source/w/webcolors/webcolors-1.3.1.tar.gz | |
$ sudo easy_install blockdiag nwdiag actdiag seqdiag |
This file contains hidden or 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
# SEE: http://d.hatena.ne.jp/shim0mura/20110730/1312046133 | |
# SEE: https://gist.github.com/1031961 | |
# SEE: http://atrpms.net/documentation/install/ | |
# 1. prepare | |
$ cat /etc/yum.repos.d/atrpms.repo | |
[atrpms-stable] | |
name=ATrpms RHEL5 stable | |
baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/stable/ | |
gpgkey=http://ATrpms.net/RPM-GPG-KEY.atrpms |
This file contains hidden or 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 | |
# usage: vmclone.sh SOURCE TARGET | |
SOURCE_NAME=$1 | |
TARGET_NAME=$2 | |
VMSTORE=/vmfs/volumes/datastore1 | |
VMID=`vim-cmd vmsvc/getallvms | awk '/'"$SOURCE_NAME"'/ {print $1;}'` | |
SOURCE_DIR=$VMSTORE/$SOURCE_NAME |
This file contains hidden or 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
package Test::More::Descriptive; | |
use strict; | |
use warnings; | |
use Exporter 'import'; | |
use Test::More (); | |
BEGIN { | |
*describe = *context = *it = \&Test::More::subtest; | |
} |
This file contains hidden or 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
-Ilib -It/lib | |
-MTest::Name::FromLine | |
--timer --verbose | |
--nocolor | |
--formatter=TAP::Formatter::JUnit | |
--recurse |
This file contains hidden or 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
use inc::Module::Install; | |
use Module::Install::AuthorTests; | |
use Module::Install::Repository; | |
use Module::Install::ReadmePodFromPod; | |
name '[% dist %]'; | |
license 'perl'; | |
all_from 'lib/[% module_unix_path %].pm'; | |
# requires ''; |
This file contains hidden or 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 'dbi' | |
require 'pp' | |
dbh = DBI.connect('dbi:mysql:database=test;host=localhost', 'test', 'test') | |
pp dbh.select_one('SELECT VERSION()') | |
sth = dbh.prepare('SELECT * FROM mysql_casual WHERE name = ?') | |
sth.execute('ikasam_a') | |
while row = sth.fetch_hash do |