docker-compose run ruby-22
docker-compose run ruby-23
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
| "use strict" | |
| class Star { | |
| constructor() { | |
| this.lines = [ | |
| { | |
| 'A': 'W', | |
| 'J': 'R', | |
| 'I': 'R', | |
| 'C': 'W', |
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
| source 'https://rubygems.org' | |
| gem 'activesupport', require: 'active_support/all' | |
| gem 'pry' | |
| gem 'tapp' | |
| gem 'awesome_print' |
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
| "use strict"; | |
| class Doukaku { | |
| seedCountFor(members: Array<string>): number { | |
| return Math.pow(2, Math.ceil(Math.log2(members.length))) - members.length; | |
| } | |
| eachSlice (array, size, callback) { | |
| for (let i = 0, l = array.length; i < l; i += size) { | |
| callback.call(this, array.slice(i, i + size)); | |
| } |
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
| require 'yaml' | |
| require 'pathname' | |
| require 'active_support/all' | |
| def convert(f) | |
| filename = Pathname.new(f) | |
| yaml = YAML.load_file(filename) | |
| name = filename.basename('.yml').to_s | |
| File.write(filename, { |
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
| --- | |
| swagger: '2.0' | |
| info: | |
| version: 0.0.0 | |
| title: Simple API | |
| paths: | |
| /: | |
| get: | |
| responses: | |
| 200: |
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
| FROM buildpack-deps:jessie | |
| ENV RUBY_MAJOR 2.4 | |
| ENV RUBY_VERSION 2.4.0-preview2 | |
| ENV RUBY_DOWNLOAD_SHA256 fec544836428aada2dc593a8cc42ce330798a805e49ecb807a0e21b386fd0b14 | |
| ENV RUBYGEMS_VERSION 2.6.7 | |
| # skip installing gem documentation | |
| RUN echo 'install: --no-document\nupdate: --no-document' >> "$HOME/.gemrc" |
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
| require 'active_support/core_ext/string/multibyte' | |
| require 'objspace' | |
| # load unicode database | |
| ''.mb_chars.upcase | |
| db = ActiveSupport::Multibyte::Unicode.send(:database) | |
| db_memsize = db.instance_variables.map do |ivar| | |
| ObjectSpace.memsize_of(db.instance_variable_get(ivar)) | |
| end.inject(:+) |
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
| version: '2' | |
| services: | |
| web: | |
| build: . | |
| nginx: | |
| image: nginx | |
| ports: | |
| - 8080:80 | |
| command: | |
https://shinjukurb.connpass.com/event/47157
大富豪をExtreme Fish Bowlで作成します。