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
alias crontab=crontabl | |
# crontab設定後crontab -lをする | |
function crontabl() { | |
if [ $# -gt 1 ]; then | |
# 複数パラメータがある場合はそのまま。 | |
\crontab $@ | |
else | |
if [ "$1" != "-r" ]; then | |
if [ "$1" != "-l" ]; then |
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
{ | |
"run_list": "role[jenkins]" | |
} |
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
{ | |
"name": "jenkins", | |
"default_attributes": { }, | |
"override_attributes": { | |
"java": { | |
"install_flavor": "oracle", | |
"jdk_version": "6", | |
"oracle": { | |
"accept_oracle_download_terms": "true" | |
} |
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 | |
# get cookbooks using berkshelf | |
berks install --path cookbooks | |
# run chef-solo | |
if [ "$?" = "0" ] then | |
chef-solo -c solo.rb -j nodes/chef.json | |
fi |
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
#! /usr/local/bin/ruby | |
######################################################################## | |
# | |
# Rubyのバッチ処理でよく使うであろう処理が書かれたクラス。 | |
# よく使うオプションをclass_optionに設定し、 | |
# このクラスを継承したクラスで利用できるようになっている。 | |
# | |
######################################################################## | |
require 'thor' |
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
#! /usr/local/bin/ruby | |
require 'thor' | |
class Test < Thor | |
class_option :help, :type => :boolean, :aliases => '-h', :desc => 'Thor test' | |
default_task :execute | |
desc "execute [OPTION]", "Test execute" | |
option :production, :type => :boolean, :aliases => '-p', :desc => "Run production DB server" | |
option :number, :type => :numeric, :aliases => '-n', :default => 3, :desc => "test number" |
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 | |
#get GitHub user name if it is not provided | |
if [ $# -lt 1 ]; then | |
echo -n "Enter GitHub user name: " | |
read _githubUsername | |
else | |
_githubUsername=$1 | |
fi |
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 | |
{ | |
srcDir="/usr/local/src" | |
installDir="/usr/local" | |
yamlFileExt=".tar.gz" | |
yaml="yaml-0.1.4" | |
yamlFileName=$yaml$yamlFileExt | |
yamlHTML="http://pyyaml.org/download/libyaml/$yamlFileName" |
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
// テキストエディタ色設定 Ver3 | |
[SakuraColor] | |
C[BRC]=0,1,000080,000000,0 | |
C[CMT]=1,0,008000,000000,0 | |
C[CTL]=1,0,00ffff,000000,0 | |
C[DFA]=0,0,ff00ff,000000,0 | |
C[DFC]=0,0,ff00ff,000000,0 | |
C[DFD]=0,0,ff00ff,000000,0 | |
C[EOF]=1,0,81f1fe,000000,0 |
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 | |
yum -y install ruby | |
yum -y install ruby-devel | |
yum -y install rubygems | |
gem update --system 1.8.25 | |
gem install chef --no-rdoc --no-ri | |
gem install rake | |
gem install knife-solo | |
#check version |