Skip to content

Instantly share code, notes, and snippets.

View dtan4's full-sized avatar

Daisuke Fujita dtan4

View GitHub Profile

ใ‚ฏใƒƒใ‚ฏใƒ‘ใƒƒใƒ‰ใฏใชใœ้–‹็™บใ—ใ‚„ใ™ใ„ใฎใ‹

  • @mirakui

cookpad

  • 2M recipes
  • 52M UB
  • 1.6M Premium Service Users
  • 1000 EC2
  • 15,000 req/s
  • 7 ops

้–‹็™บๆˆฆ็•ฅๆ€งใ‚’ไธŠใ’ใ‚‹ใŸใ‚ใฎใƒ‡ใƒ—ใƒญใ‚คๆˆฆ็•ฅ

  • ๅ‰็พฝใ•ใ‚“

deploy

  • ใ‚ใ‚‰ใ‚†ใ‚‹็’ฐๅขƒใธใฎใ‚ณใƒผใƒ‰ใ‚„ใƒใ‚คใƒŠใƒชใ€ใ‚ขใ‚ปใƒƒใƒˆใชใฉใฎ้…ๅธƒ
  • ใ‚คใƒณใƒ•ใƒฉใฎๆง‹็ฏ‰ใฏใƒ—ใƒญใƒ“ใ‚ธใƒงใƒ‹ใƒณใ‚ฐ

amazon

  • amazon.com
  • ๅนณๆ—ฅใฎใƒ‡ใƒ—ใƒญใ‚คๆ„Ÿ่ฆš 11.6s

ๅฎŸ่ทต GitHub Flow

  • @cobyism
  • GitHub
    • 9.7M devs
    • 23.3M projects
    • 293 employees
    • 65% remote
    • ๅŒ—็ฑณใจ่ฅฟๆฌงใŒใƒกใ‚คใƒณใ€ใ‚ขใ‚ธใ‚ขใ‚‚ๆ—ฅๆœฌไธญๅ›ฝๅฐๆนพใƒ•ใ‚ฃใƒชใƒ”ใƒณใ‚ใŸใ‚Š

GitHub Flow

@dtan4
dtan4 / changed-specs
Last active August 29, 2015 14:16
Extract spec files which were changed from specified branch/commit
#!/usr/bin/env ruby
#
# Example usage
# - Test only changed model files & specs from master
# $ bundle exec rspec $(script/changed-specs model master)
#
require "open3"
require "shellwords"
@dtan4
dtan4 / Dockerfile
Created January 21, 2015 06:51
Minimal Sinatra Application on Docker
FROM ruby:2.2.0
RUN bundle config --global frozen 1
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
ADD Gemfile /usr/src/app/
ADD Gemfile.lock /usr/src/app/
RUN bundle install --without test development --system
tell application "iTunes"
set trackLyrics to lyrics of current track
return trackLyrics
end tell
#!/bin/bash
base_dir=`pwd`
wget https://mecab.googlecode.com/files/mecab-0.996.tar.gz
tar zxfv mecab-0.996.tar.gz
cd mecab-0.996
./configure --enable-utf8-only
make
make check
#!/usr/bin/env ruby
require "RMagick"
list = []
10.times do |i|
list << "lena_#{i}.png"
end
require "spec_helper"
module Sample
describe Spec do
it "should return JSON without id" do
task = described_class.new(id, params)
end
end
end
#!/usr/bin/env ruby
require "json"
require "open-uri"
URL = "https://api.github.com/users/dtan4/repos"
json = open(URL).read
repositories = JSON.parse(json, symbolize_names: true)