$ mkdir {your_app}
$ bundle init
$ vim Gemfile
# enable rails gem and edit version
gem "rails", '5.2.0'
$ bundle install --path=vendor/bundle --jobs=4
create new profile
$ brew update
$ brew upgrade aws-cli aws-elasticbeanstalk
$ aws configure --profile [profile-name]
# add setting ~/.aws/[config/credentials]
$ eb init --profile [profile-name]
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
[ | |
{ | |
"code": 1, | |
"name": "北海道", | |
"name_e": "hokkaido", | |
"name_h": "ほっかいどう", | |
"name_k": "ホッカイドウ", | |
"area": "北海道" | |
}, | |
{ |
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
#!/bin/bash | |
PLIST=platforms/ios/*/*-Info.plist | |
echo 'exec overwrite_plist.sh' | |
cat << EOF | | |
Delete :CFBundleDevelopmentRegion | |
Add :CFBundleDevelopmentRegion array | |
Add :CFBundleDevelopmentRegion:0 string "Japanese" |
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
######## | |
# ~~~ | |
######## | |
location /public { | |
alias /var/app/current/public; | |
gzip_static on; | |
gzip on; | |
expires 0; | |
add_header Cache-Control public; |
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
# ref: https://api.slack.com/robots | |
location / { | |
if ( $http_user_agent ~* (Slackbot-LinkExpanding) ) { | |
return 403; | |
} | |
} |
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
# ファイルに書き出したい | |
>> f = File.new(Rails.root + 'hoge.json', 'w') | |
>> f << JSON.pretty_generate(Post.all.as_json) | |
>> f.close | |
# 出力したい | |
>> puts JSON.pretty_generate(Post.all.as_json) |
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
// src/app/app.module.ts | |
import { Firebase } from '@ionic-native/firebase'; | |
@NgModule({ | |
//... | |
providers: [ | |
Firebase, | |
], | |
//... | |
}) | |
export class AppModule {} |
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' | |
# google/google-auth-library-ruby | |
gem 'googleauth' | |
# HTTPリクエストできればなんでもよい | |
gem 'faraday' |