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": "amazon-ebs", | |
"ssh_pty": "true", | |
"region": "ap-northeast-1", | |
"source_ami_filter": { | |
"filters": { | |
"architecture": "x86_64", | |
"name": "amzn-ami-hvm-*.0.20*-ebs,amzn-ami-hvm-*.1.20*-ebs,amzn-ami-hvm-*.2.20*-ebs,amzn-ami-hvm-*.3.20*-ebs,amzn-ami-hvm-*.4.20*-ebs,amzn-ami-hvm-*.5.20*-ebs,amzn-ami-hvm-*.6.20*-ebs,amzn-ami-hvm-*.7.20*-ebs,amzn-ami-hvm-*.8.20*-ebs,amzn-ami-hvm-*.9.20*-ebs", |
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
% AWS_DEFAULT_PROFILE=dev-shared-provisioning-script-deployer ./create_ami.sh | |
amazon-ebs output will be in this color. | |
==> amazon-ebs: Force Deregister flag found, skipping prevalidating AMI Name | |
==> amazon-ebs: No AMI was found matching filters: { | |
==> amazon-ebs: Filters: [ | |
==> amazon-ebs: { | |
==> amazon-ebs: Name: "root-device-type", | |
==> amazon-ebs: Values: ["ebs"] | |
==> amazon-ebs: }, |
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 bash | |
set -ex | |
ip_list=() | |
ip_list+=("192.168.1.1") | |
ip_list+=("192.168.1.2") | |
ip_list+=("192.168.1.3") | |
ip_list+=("192.168.1.4") |
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
foreach (debug_backtrace() as $func) | |
{ | |
\Log::warning($func['file'] . ' - ' . $func['class'] . $func['type'] | |
. $func['function'] . '(' . $func['args'] . ')[L' . $func['line'] . ']'); | |
} |
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/env ruby | |
# -*- coding: utf-8 -*- | |
require 'open-uri' | |
require 'nokogiri' | |
require 'pry' | |
doc = Nokogiri::HTML(open('http://www.wizards.com/magic/tcg/article.aspx?' + | |
'x=mtg/tcg/dragonsmaze/cig', | |
'Accept-Language' => 'ja,en-US;q=0.8,en;q=0.6')) |
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
import scala.util.Random | |
object lunch_script { | |
def main(args: Array[String]) : Unit = { | |
val splitMember = shuffleAndSplit(args.toList, 20121018) | |
println(splitMember._1) | |
println(splitMember._2) | |
} | |
def shuffleAndSplit(member: List[String], date: Long) : (List[String], List[String]) = { |
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 | |
class Member | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
end | |
def hand |
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 | |
class Member | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
end | |
def win?(opponent) | |
raise 'should be overrided' | |
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
#!/usr/bin/env ruby | |
class Member | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
end | |
end | |
class Symbol |
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 | |
class Member | |
attr_reader :name | |
def initialize(name) | |
@name = name | |
end | |
def win?(opponent) | |
result_table = { gu: { gu: :even, choki: :win, pa: :lose }, |