Skip to content

Instantly share code, notes, and snippets.

View marocchino's full-sized avatar
🏠
Working from home (7am~16pm JST)

marocchino

🏠
Working from home (7am~16pm JST)
View GitHub Profile

분산 테스트 실행 시스템 RRRSpec을 출시하였습니다.

  • 2014년 3월 24일

기술부 알바 스즈키(@draftcode) 입니다.

쿡패드가 내부용으로 개발/운영해온 분산 테스트 실행 시스템 RRRSpec을 오픈 소스로 공개했습니다. RRRSpec은 시간이 걸리는 자동화 된 테스트를 분산 처리 하여 전체 테스트 시간을 단축하는 애플리케이션입니다. 현재 쿡패드에서는 17,000개가 넘는 테스트가 있어서 컴퓨터 한 대에서 테스트를 실행하면 완료하는 데 몇 시간이 걸립니다. 이 테스트를 60개의 머신에서 병렬 분산 처리 함으로써 평균 8분에서 9분 정도에 완료할 수 있게 되었습니다. 또한, Amazon EC2 스팟 인스턴스를 사용함으로써 상당한 비용 절감 효과도 동시에 달성했습니다.

https://github.com/cookpad/rrrspec

Taskset_-_RRRSpec

@marocchino
marocchino / 1.user_before_test.spec.coffee
Last active August 29, 2015 13:56
instance variable test
class Problem
ERROR:
tooComplicated: new Error "I can't do that"
constructor: ->
@tokens = ["some", "tokens"]
answer: ->
if @tokens
throw @ERROR.tooComplicated
class A < ActiveRecord::Base
validates :phoneNum1, numericality: { only_integer: true }
validates :phoneNum2, numericality: { only_integer: true }
validates :phoneNum3, numericality: { only_integer: true }
def phoneNum1
phoneNum && phoneNum.split("-")[0]
end
def phoneNum2
phoneNum && phoneNum.split("-")[1]
@marocchino
marocchino / gist:7884710
Created December 10, 2013 02:07
translate to korean apple script
-- ref --
-- http://superuser.com/questions/296421/google-translate-client-for-os-x
-- https://gist.github.com/mayoff/1138816
on run argv
tell application "Google Chrome"
activate
set theUrl to "http://translate.google.com/#en|ko|" & item 1 of argv
if (count every window) = 0 then
@marocchino
marocchino / Guardfile
Created October 31, 2013 05:24 — forked from thbar/Guardfile
require 'childprocess'
guard 'shell' do
watch %r{^app/(.+)\.rb$} do |m|
`killall rake`
# Why this:
# - spawn a child process to avoid locking Guard
# - make sure that the child process has stdout and stdin otherwise it crashes
# - bonus point: get REPL access in the simulator!
if [[ $BUILD_STATUS == "success" ]]
then
export STATUS="success"
else
export STATUS="failure"
fi
curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \
-H "Content-Type: application/json" \
-X POST \
module.exports = function (dir, ext, callback){
var fs = require('fs');
fs.readdir(dir, function(err, files){
if (err) {
callback(err);
} else {
callback(null, files.filter(function(file) {
return file.match("\\." + ext + "$");
}));
}
import sys
import tweepy
import time
import urllib2
def send_to_twitter(msg):
CONSUMER_KEY = 'UvciBAguVW4UBYBkWeirKg'
CONSUMER_SECRET = 'eCPMIB4sMUDTfTExohS5PyzlIKMFGpWprMbgINqhU'
ACCESS_KEY = '196057523-d2RNDmy3YE5b5v0L59EKfYGIOS31Q9iEdLNdyE1u'
ACCESS_SECRET = 'Dvlg8M7HhS3DdJVjI13CBllFel1Ke9uhEv6VgbIoXg'
 puts "yahoo"
# fish
brew install openssl rbenv ruby-build
set CONFIGURE_OPTS --with-openssl-dir=/usr/local/opt/openssl
rbenv install ruby2.0.0-p195
rbenv global ruby2.0.0-p195
rbenv rehash