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
| def main | |
| lifegame = Lifegame.new(width: 100) | |
| generation = 0 | |
| loop do | |
| # puts "Generation: #{generation} ---------------------------" | |
| lifegame.draw | |
| sleep 0.025 | |
| generation += 1 | |
| end |
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
| class S3Info | |
| require "json" | |
| require "pstore" | |
| attr_reader :info | |
| def initialize | |
| @info = JSON.parse(`aws s3api list-buckets`) | |
| end | |
| def buckets |
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
| const fs = require('fs'); | |
| const path = require('path'); | |
| // docs配下に属するディレクトリをサイドバーのグループに定義する | |
| // dir直下のディレクトリにしか対応していない | |
| var dirpath = "./docs" | |
| var dirs = fs.readdirSync(dirpath).filter((f) => { | |
| return fs.existsSync(dirpath + "/" + f) && fs.statSync(dirpath + "/" + f).isDirectory() | |
| }) | |
| var sidebarArray = ["/"].concat(dirs.map((dir) => { |
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
| <!DOCTYPE html> | |
| <html lang="js"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <meta name="description" content=""> | |
| <meta name="author" content=""> | |
| <title>my page</title> |
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 "aws-sdk" | |
| require "pp" | |
| cred = Aws::Credentials.new("#{aws_access_key_id}", "#{aws_secret_access_key}") | |
| rekognition = Aws::Rekognition::Client.new(credentials: cred, region: 'us-east-1') | |
| ret = rekognition.detect_labels({ | |
| image: { | |
| s3_object: { | |
| bucket: "yutoogi.images", |
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
| =begin | |
| mkdir dynamodb_local | |
| wget https://s3-ap-northeast-1.amazonaws.com/dynamodb-local-tokyo/dynamodb_local_latest.tar.gz -P dynamodb_local | |
| tar -xzvf dynamodb_local/dynamodb_local_latest.tar.gz -C dynamodb_local | |
| echo '#!/bin/bash\njava -Djava.library.path=./dynamodb_local/DynamoDBLocal_lib -jar dynamodb_local/DynamoDBLocal.jar -sharedDb' >> dynamodb_local/start.sh | |
| chmod 700 start.sh | |
| bash dynamodb_local/start.sh | |
| =end |
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
| # (output sample) | |
| # {"Library Tapes"=> | |
| # [{"A Summer Beneath The Trees"=> | |
| # ["01 The Sound Of Emptiness Part 1.m4p", | |
| # "02 Pieces Of Us Were Left On The Tracks....m4p", | |
| # "03 Above The Flood.m4p", | |
| # "04 A Summer Beneath The Trees.m4p", | |
| # "05 The Fragile Tide.m4p", | |
| # "06 The Modest Triumph.m4p", | |
| # "07 The Sound Of Emptiness Part 2.m4p", |
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
| # rails template | |
| # rails new testapp -m ./template.rb --skip-bundle --skip-test | |
| # development, test | |
| gem_group :development, :test do | |
| gem "better_errors" | |
| gem "binding_of_caller" | |
| gem "pry-byebug" | |
| gem "pry-doc" | |
| gem "bullet" |
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
| var event = { | |
| "Records": [ | |
| { | |
| "EventVersion": "1.0", | |
| "EventSubscriptionArn": "arn:aws:sns:EXAMPLE", | |
| "EventSource": "aws:sns", | |
| "Sns": { | |
| "SignatureVersion": "1", | |
| "Timestamp": "1970-01-01T00:00:00.000Z", | |
| "Signature": "EXAMPLE", |
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
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| # All Vagrant configuration is done below. The "2" in Vagrant.configure | |
| # configures the configuration version (we support older styles for | |
| # backwards compatibility). Please don't change it unless you know what | |
| # you're doing. | |
| Vagrant.configure("2") do |config| | |
| # The most common configuration options are documented and commented below. | |
| # For a complete reference, please see the online documentation at |