Skip to content

Instantly share code, notes, and snippets.

@tatsuosakurai
tatsuosakurai / birthday_around_a_week_challenge.rb
Created May 15, 2019 11:24
ruby( ActiveSupportあり )で、誕生日の前後一週間かどうかを判定するメソッドを実装してください〜
# 準備
# `gem i activesupport`
# `gem i rspec`
# 実行
# `rspec birthday_around_a_week_challenge.rb`
# 実装
require 'active_support'
require 'active_support/core_ext'
# require 'byebug'
@tatsuosakurai
tatsuosakurai / birthday_test.rb
Last active May 16, 2019 09:47
誕生日の前後一週間かどうかを判定したい!
# 準備
# `gem i activesupport`
# `gem i rspec`
# 実行
# `rspec birthday_test.rb`
# 実装
require 'active_support'
require 'active_support/core_ext'
# require 'byebug'
@tatsuosakurai
tatsuosakurai / first_step_rspec.md
Last active June 4, 2019 04:16
RSpec 始めの一歩

RSpec を使ってみよう ver.20190319

  • ペアでやってる方は、随時、気になってること、気づいたことをお話してください:)
  • $ はコマンドラインでの実行を表現しているだけなので、打たなくでOKです:)
  • rspec https://github.com/rspec/

1歩目

rspec-bird ディレクトリ作成してみる

$ mkdir rspec-bird
https://github.com/discourse/discourse
https://github.com/feedbin/feedbin
https://github.com/gitlabhq/gitlabhq
https://github.com/coderwall/coderwall-next
https://github.com/codecation/trailmix
https://github.com/thepracticaldev/dev.to
https://github.com/spree/spree
https://github.com/redmine/redmine
@tatsuosakurai
tatsuosakurai / railsguidesj2e
Created April 18, 2018 06:16
railsguides.jp → guides.rubyonrails.org
javascript:var d=document,u=d.URL,en="http://guides.rubyonrails.org",jp="https://railsguides.jp";d.location.href=u.replace(jp,en);
@tatsuosakurai
tatsuosakurai / railsguidesjp2guidesrororg
Last active July 8, 2017 08:04
Rails guide の日本語ページから英語ページに遷移するブックマークレット
javascript:var d=document,u=d.URL,en="http://guides.rubyonrails.org",jp="https://railsguides.jp";d.location.href=u.replace(jp,en);

TODO

  • 宿に21:30くらいに付く予定だけど晩御飯だしてもらえるか確認
  • コメント要確認↓

日程(予定)

  • 9/4金:夜20時東京駅(銀の鈴)集合、新幹線のチケット(20:26発 こだま687号(N700系)(名古屋行)
javascript:var d=document,t=d.title,u=d.URL,i=d.createElement('input');i.value='['+t+']('+u+' )';d.body.appendChild(i);i.focus();i.select();
<% repo = Grit::Repo.new(Rails.root).head.name rescue nil %>
development:
adapter: mysql2
encoding: utf8
database: hoge_development<%= "_#{repo}" %>
@tatsuosakurai
tatsuosakurai / application.js
Last active August 29, 2015 14:00
JavaScript Setting for Rails Controller
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD