Skip to content

Instantly share code, notes, and snippets.

Avatar

Hiro Fukami d-sea

View GitHub Profile
@d-sea
d-sea / Dockerfile
Created Mar 31, 2021
Ruby on Rails Docker file (Ruby on Rails + Vue.js + MySQL)
View Dockerfile
FROM ruby:2.6.6
# Japanese fonts
RUN apt-get update && apt-get install -y locales && \
locale-gen ja_JP.UTF-8 && \
apt-get install -y fonts-vlgothic
ENV LANG ja_JP.UTF-8
ENV LC_CTYPE ja_JP.UTF-8
RUN localedef -f UTF-8 -i ja_JP ja_JP.utf8
@d-sea
d-sea / docker-compose.yml
Created Mar 31, 2021
Ruby on Rails + Vue.js + MySQL docker-compose.yml
View docker-compose.yml
version: '3'
services:
web:
# image: ruby:2.6.6
build:
context: .
dockerfile: Dockerfile-web
depends_on:
- db
ports:
@d-sea
d-sea / item-list.json
Created Aug 28, 2020
お気に入りアイテム管理用JSON
View item-list.json
{"name": "ワイン 6本", "cycle": 35, "shop": "フォレスト", "updated_date": "2020-06-08"}
{"name": "睦菜コンタクトレンズ", "cycle": 120, "shop": "Rakuten", "updated_date": "2020-04-20"}
{"name": "ハードゼリー ロレッタ", "cycle": 250, "shop": "Yodobashi", "updated_date": "2020-01-23"}
{"name": "プロテイン ビーレジェンド パッションフルーツ 3袋", "cycle": 100, "shop": "オリジナルサイト", "updated_date": "2020-05-22"}
{"name": "ジョンソンボディケア エクストラケア 高保湿ローション 200g", "cycle": 41, "shop": "Yodobashi", "updated_date": "2020-06-15"}
{"name": "フィニッシュ 食洗機用洗剤 パウダー 詰替 900g", "cycle": 125, "shop": "Yodobashi", "updated_date": "2020-04-24"}
{"name": "歯磨き粉 シュミテクト", "cycle": 120, "shop": "Yodobashi", "updated_date": "2020-05-14"}
{"name": "モイスト・ダイアン ボタニカル シャンプー モイスト 詰め替え 380ml", "cycle": 50, "shop": "Yodobashi", "updated_date": "2020-06-07"}
{"name": "モイスト・ダイアン ボタニカル トリートメント モイスト 詰め替え 380ml", "cycle": 55, "shop": "Yodobashi", "updated_date": "2020-06-07"}
{"name": "トイレットペーパー 12ロール", "cycle": 25, "shop": "Yodobashi", "updated_date": "2020-06-14"}
@d-sea
d-sea / okini-sample.rb
Created Aug 28, 2020
買い忘れ防止のためのメール通知スクリプト (使い切る前に買い時をお知らせ。特定の日にちサイクルで通知する)
View okini-sample.rb
require 'date'
require 'mail'
require 'json'
notify_term = 7
buy_now_body = ""
yet_body = ""
File.open("item-list.json", "r+:UTF-8") do |f|
@d-sea
d-sea / response.json
Last active Aug 6, 2020
response from SearchItems of Amazon Product Advertising API v5
View response.json
{
"SearchResult": {
"Items": [
{
"ASIN": "B01M9IY6RS",
"DetailPageURL": "https://www.amazon.co.jp/dp/B01M9IY6RS?tag=dsea-22&linkCode=osi&th=1&psc=1",
"Images": {
"Primary": {
"Medium": {
"Height": 109,
View FirebaseUI_SampleLogin.swift
//
// MyPageTableViewController.swift
// Futsal-Kakekomi
//
// Created by Hiro Fukami on 2019/05/03.
// Copyright © 2019 Hiro Fukami. All rights reserved.
//
import UIKit
import Firebase
@d-sea
d-sea / FormViewController.swift
Created May 27, 2019
Firebase FIrestore addDocuments GeoPoint data in Fureka
View FormViewController.swift
//
// FormViewController.swift
// Futsal-Kakekomi
//
// Created by Hiro Fukami on 2019/05/01.
// Copyright © 2019 Hiro Fukami. All rights reserved.
//
import UIKit
import Eureka
@d-sea
d-sea / ViewController.swift
Created May 27, 2019
Firebase Firestore getDocuments GeoPoint data
View ViewController.swift
//
// ViewController.swift
// Futsal-Kakekomi
//
// Created by Hiro Fukami on 2019/04/22.
// Copyright © 2019 Hiro Fukami. All rights reserved.
//
import UIKit
import Firebase
View notify_subscription_items.rb
require 'date'
require 'mail'
require 'json'
notify_term = 5
File.open("item-list.json", "r+") do |f|
f.each_line { |line|
item = JSON.parse(line)
@d-sea
d-sea / docker-compose.yml
Created Oct 17, 2017
Ruby on Rails 開発環境を Docker Compose で作った際の docker-compose.yml
View docker-compose.yml
version: '2'
services:
web:
depends_on:
- db
image: ruby:2.3.0
ports:
- "3000:3000"
links:
- db