View Dockerfile
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
# Docker Ruby 2.5 on Rails 5.0.3 (ProgateのRuby on Rails 5 学習レッスンとほぼ同じ環境) | |
FROM ruby:2.5 | |
# Rails6ではnodejsとyarnはwebpackをインストールする際に必要 | |
# yarnパッケージ管理ツールをインストール | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
RUN apt-get update -qq && apt-get install -y nodejs build-essential libpq-dev postgresql-client yarn | |
WORKDIR /myapp |
View Gemfile
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
source 'https://rubygems.org' | |
gem 'rails', '5.0.3' | |
# Use Puma as the app server | |
gem 'puma', '3.6.2' | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '5.0.6' | |
# Use Uglifier as compressor for JavaScript assets | |
gem 'uglifier', '3.0.4' | |
gem 'pry-rails', '0.3.4' |
View Dockerfile
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
# Docker Ruby 2.5 on Rails 5.1.6 | |
FROM ruby:2.5 | |
# Rails6ではnodejsとyarnはwebpackをインストールする際に必要 | |
# yarnパッケージ管理ツールをインストール | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
RUN apt-get update -qq && apt-get install -y nodejs build-essential libpq-dev postgresql-client yarn | |
WORKDIR /myapp |
View Dockerfile
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
# Ruby 2.7 on Rails 6 | |
FROM ruby:2.7.4 | |
# Rails6ではnodejsとyarnはwebpackをインストールする際に必要 | |
# yarnパッケージ管理ツールをインストール | |
# yarnパッケージ管理ツールをインストール | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \ | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
RUN apt-get update -qq && apt-get install -y nodejs build-essential libpq-dev postgresql-client yarn |
View Dockerfile
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
# Ruby 3.1 on Rails 7 | |
FROM ruby:3.1.0 | |
RUN apt-get update -qq && apt-get install -y nodejs postgresql-client | |
WORKDIR /myapp | |
COPY Gemfile /myapp/Gemfile | |
COPY Gemfile.lock /myapp/Gemfile.lock | |
RUN bundle install | |
# コンテナー起動時に毎回実行されるスクリプトを追加 | |
COPY entrypoint.sh /usr/bin/ |
View index.html
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Hello Bulma!</title> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@0.9.1/css/bulma.min.css"> | |
</head> | |
<body> | |
<section class="section"> |
View predict.js
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
const CLASSES = {0:'Apple', 1:'MikanOrange'} | |
//----------------------- | |
// start button event | |
//----------------------- | |
$("#start-button").click(function(){ | |
loadModel() ; | |
startWebcam(); | |
}); |
View main.dart
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 'package:flutter/material.dart'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
View flutter-web_firestore_list.main.dart
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 'package:flutter/material.dart'; | |
import 'package:firebase/firebase.dart'; | |
import 'package:firebase/firestore.dart' as fs; | |
// initializeApp()の中身は、ご自身の設定に書き換えてください。 | |
void main() { | |
initializeApp( | |
apiKey: "YourApiKey", | |
authDomain: "YourAuthDomain", | |
databaseURL: "YourDatabaseUrl", |
View flutter-web_firestore_list
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 'package:flutter/material.dart'; | |
import 'package:firebase/firebase.dart'; | |
import 'package:firebase/firestore.dart' as fs; | |
void main() { | |
initializeApp( | |
apiKey: "YourApiKey", | |
authDomain: "YourAuthDomain", | |
databaseURL: "YourDatabaseUrl", | |
projectId: "YourProjectId", |
NewerOlder