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 ubuntu:latest AS cow-builder | |
WORKDIR /tmp | |
RUN apt-get update && apt-get install -y cowsay | |
RUN /usr/games/cowsay 'Hello world!' > ./cow.txt | |
FROM ubuntu:latest | |
COPY --from=cow-builder /tmp/cow.txt . | |
CMD ["cat", "cow.txt"] |
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 java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.Collections; | |
import java.util.Date; | |
import java.util.HashSet; | |
import java.util.Set; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.TimeUnit; |
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
# [Sinatra](http://sinatrarb.com/intro.html) example | |
require 'sinatra' | |
get('/') do | |
"Hello Sinatra world!" | |
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 | |
# coding: utf-8 | |
require 'test/unit' | |
require 'uri' | |
require 'selenium-webdriver' # http://www.rubydoc.info/gems/selenium-webdriver/ | |
# | |
# 各種検索エンジンで「Ruby」を検索すると, | |
# トップヒットが Ruby の公式サイト ("www.ruby-lang.org") となることをテストする. | |
# |
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 'find' | |
class IgnoreAnnotater | |
def annotate_ignore(src_path) | |
File.open(src_path, "r+") do |file| | |
# TODO: Add `@Ignore` only if not ignored yet. | |
content = file.read() | |
edited = content.gsub!("@Test", "@Test @Ignore") |
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
# coding: utf-8 | |
require 'csv' | |
class Contractors | |
HEAD = BasicObject.new | |
class << HEAD | |
def calc(values) | |
values[0] | |
end | |
end |