Skip to content

Instantly share code, notes, and snippets.

View aq2bq's full-sized avatar

aq2bq aq2bq

  • YUKASHIKADO Inc.
  • Japan
  • X @aq2bq
View GitHub Profile
@aq2bq
aq2bq / StudyingGit.sh
Last active July 19, 2017 10:12
StudyingGit:復習メモ
# ブランチ
## リモートのgitブランチをローカルにチェックアウトする
$ git checkout -b branch_name origin/branch_name
## - http://sessan.hatenablog.com/entry/2012/11/04/132746
## masterブランチに加えられた変更をトピックブランチへマージする
$ git checkout topic_branch
$ git merge master
@aq2bq
aq2bq / spree_state_create.rb
Last active December 19, 2015 05:49
Spree::Stateの初期データ投入。/ ありがとうございます: https://gist.github.com/koseki/38926
# encoding: utf-8
Spree::Country.create!({"name"=>"日本", "iso3"=>"JPN", "iso"=>"JP", "iso_name"=>"JAPAN", "numcode"=>"392"}, :without_protection => true)
country = Spree::Country.find_by_name('日本')
Spree::State.create!({"name"=>"北海道", "abbr"=>"hokkaido", :country=>country}, :without_protection => true)
Spree::State.create!({"name"=>"青森県", "abbr"=>"aomori", :country=>country}, :without_protection => true)
Spree::State.create!({"name"=>"岩手県", "abbr"=>"iwate", :country=>country}, :without_protection => true)
Spree::State.create!({"name"=>"宮城県", "abbr"=>"miyagi", :country=>country}, :without_protection => true)
Spree::State.create!({"name"=>"秋田県", "abbr"=>"akita", :country=>country}, :without_protection => true)
Spree::State.create!({"name"=>"山形県", "abbr"=>"yamagata", :country=>country}, :without_protection => true)