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 | |
mode_identifier = `system_profiler SPHardwareDataType | awk '/Model Identifier:/ {print $3}'` | |
`open http://www.everymac.com/ultimate-mac-lookup/?search_keywords=#{mode_identifier}` |
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 'twitter' | |
require 'pp' | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = ENV['CONSUMER_KEY'] | |
config.consumer_secret = ENV['CONSUMER_SECRET'] | |
config.access_token = ENV['ACCESS_TOKEN'] | |
config.access_token_secret = ENV['ACCESS_TOKEN_SECRET'] | |
end |
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/bash | |
# | |
# Install vault by HashiCorp | |
cd /usr/local/bin | |
wget -O vault.zip https://dl.bintray.com/mitchellh/vault/vault_0.2.0_linux_amd64.zip | |
yum install -y unzip | |
unzip vault.zip | |
rm vault.zip |
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 'thor' | |
class CookMan < Thor | |
desc "prepare", "Prepare to one or more hosts" | |
option :hostname, :required => true, :aliases => :h, :type => :array | |
def prepare | |
options[:hostname].each do |h| | |
system "bundle exec knife solo prepare #{h}" |
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
Ohai.plugin(:PublicIp) do | |
provides 'public_ip' | |
collect_data do | |
public_ip Mash.new | |
public_ip[:public_ip] = `curl -s http://whatismyip.akamai.com/` | |
end | |
end |
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
{ | |
"builders": [ | |
{ | |
"type": "virtualbox-ovf", | |
"source_path": "/path/to/sample.ova", | |
"ssh_username": "vagrant", | |
"ssh_password": "vagrant", | |
"shutdown_command": "echo 'vagrant' | sudo -S /sbin/shutdown -h now" | |
} | |
], |
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
# Kickstart file automatically generated by anaconda. | |
#version=DEVEL | |
install | |
cdrom | |
lang en_US.UTF-8 | |
keyboard jp106 | |
network --onboot yes --device eth0 --bootproto dhcp --noipv6 | |
network --onboot no --device eth1 --bootproto dhcp --noipv6 | |
rootpw --iscrypted <暗号化されたパスワード> |
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
FROM centos:7 | |
RUN \ | |
yum install -y wget unzip && \ | |
cd /usr/local/bin && \ | |
wget https://releases.hashicorp.com/vault/0.4.1/vault_0.4.1_linux_amd64.zip && \ | |
unzip vault_0.4.1_linux_amd64.zip && \ | |
rm vault_0.4.1_linux_amd64.zip |
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
FROM centos:5.11 | |
RUN \ | |
yum install -y httpd && \ | |
chkconfig httpd on && \ | |
/etc/init.d/httpd start |
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 | |
# | |
# consul - this script manages the consul agent | |
# | |
# chkconfig: 345 95 05 | |
# description: consul_0.6.0 | |
# processname: consul | |
### BEGIN INIT INFO | |
# Provides: consul |