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
[73] pry(main)> (1..100).step(1).to_a.each{|n| warn n if n==100} | |
100 | |
=> [1, | |
2, | |
3, | |
4, | |
5, | |
: #ダンプ出力があふれてpagerが立ち上がる | |
--------------------- | |
[74] pry(main)> (1..100).step(1).to_a.each{|n| warn n if n==100}; |
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
➜ ~ rbenv global 1.9.3-p286 | |
➜ ~ rbenv rehash | |
➜ ~ gem install pry | |
Fetching: coderay-1.0.8.gem (100%) | |
Fetching: slop-3.4.3.gem (100%) | |
Fetching: method_source-0.8.1.gem (100%) | |
Fetching: pry-0.9.11.4.gem (100%) | |
Successfully installed coderay-1.0.8 | |
Successfully installed slop-3.4.3 | |
Successfully installed method_source-0.8.1 |
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
#!/usr/bin/env ruby | |
require 'csv' | |
require 'yaml' | |
require 'json' | |
csv =<<EOF | |
id,name,price | |
A1,apple,100 | |
A2,grape,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
#!/usr/bin/env ruby | |
require 'net/ssh' | |
require 'highline/import' | |
def get_password | |
ask( "Enter Password: " ) {|q| q.echo = '*'} | |
end | |
def remote_sudo host, ssh_user, command, opts={} |
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
class WSLogger | |
def initialize(ws) | |
@ws = ws | |
end | |
def write(*args) | |
@ws.send(*args) | |
end | |
def close |
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 | |
rpm -i 'http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm' | |
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt | |
yum -y --enablerepo=rpmforge-extras update git |
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
cd /tmp | |
wget http://ftp.tsukuba.wide.ad.jp/software/apache/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.tar.gz | |
tar -xzf apache-maven-3.2.3-bin.tar.gz -C /opt/ | |
cat << EOF > /etc/profile.d/maven.sh | |
export M3_HOME=/opt/apache-maven-3.2.3 | |
export M3=\$M3_HOME/bin | |
export PATH=\$M3:$PATH | |
EOF |
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 | |
cd /tmp | |
wget --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" \ | |
"http://download.oracle.com/otn-pub/java/jdk/7u67-b01/jdk-7u67-linux-x64.rpm" | |
rpm -Uvh jdk-7u67-linux-x64.rpm |
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
cd /tmp | |
wget https://storage.googleapis.com/golang/go1.3.3.linux-amd64.tar.gz | |
tar -xzf go1.3.3.linux-amd64.tar.gz -C /usr/local | |
cat << EOF > /etc/profile.d/golang.sh | |
export PATH=\$PATH:/usr/local/go/bin | |
EOF |
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
pipeline: | |
- stage_name: command_stage_1 | |
command: echo "hello, world" | |
run_after: | |
- stage_name: command_stage_2_group_1 | |
command: echo "hello, world, command_stage_2_group_1" && sleep 1 | |
- stage_name: command_stage_3_group_1 | |
command: echo "hello, world, command_stage_3_group_1"&& sleep 0.2 | |
run_after: | |
- stage_name: command_stage_3_group_2 |
OlderNewer