Skip to content

Instantly share code, notes, and snippets.

$ ruby 01.rb
user system total real
0.880000 0.000000 0.880000 ( 0.884170)
0.880000 0.000000 0.880000 ( 0.888569)
@kasei-san
kasei-san / 第二回テスト駆動開発読書感想会議事録.md
Last active February 24, 2018 05:59
第二回テスト駆動開発読書感想会議事録.md

第二回テスト駆動開発読書感想会議事録

リファクタリングとデザインパターンについて

  • デザインパターンを知るキッカケになりそう
  • デザインパターンは知識的に理解しているつもりだが、実践できていない
@kasei-san
kasei-san / テスト駆動開発読書感想会議事録.md
Created November 21, 2017 08:22
テスト駆動開発読書感想会議事録

テスト駆動開発読書感想会議事録

集中

  • TDDは1つのボールに集中する
  • 「割り込みにさらに割り込みしない」は実践したい

TDDというスキル

2 [02/Sep/2016:13:38:35
1 [02/Sep/2016:13:38:36
1 [02/Sep/2016:13:38:37
1 [02/Sep/2016:13:38:38
8 [02/Sep/2016:13:38:49
11 [02/Sep/2016:13:38:50
11 [02/Sep/2016:13:38:51
9 [02/Sep/2016:13:38:52
10 [02/Sep/2016:13:38:53
11 [02/Sep/2016:13:38:54
#!/bin/sh
if [ $# -ne 1 ]; then
echo "usage: $ yomikata git"
exit 1
fi
curl http://yomikata.org/word/$1 2>/dev/null| egrep -o "「([^「]+)」です"
@kasei-san
kasei-san / .autotest
Created June 25, 2013 06:13
autospec で、結果を Growl で通知 【参考】autotest + growl で楽々テスト - 僕は発展途上技術者 http://blog.champierre.com/774
# vim: set ft=ruby
module Autotest::Growl
def self.growl title, msg, pri=0, sticky=""
msg += " at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}"
system "growlnotify -n autotest -p #{pri} -m #{msg.inspect} #{title} #{sticky}"
end
Autotest.add_hook :ran_command do |at|
output = at.results.last
output = output.gsub!(/\e\[\d+m/,'').gsub!(/\n/,'')
@kasei-san
kasei-san / fms_switcher.js
Last active December 17, 2015 21:38 — forked from zentooo/fms_switcher.js
最新のvimpだと、PLUGIN_INFO の所でエラーが出るので修正
let PLUGIN_INFO = xml`
<VimperatorPlugin>
<name>fms_switcher</name>
<description>This script allows you to switch FireMobileSimulator status with Vimp CLI.</description>
<version>1.0.1</version>
<author>zentooo</author>
<license>Creative Commons</license>
<detail><![CDATA[
== Subject ==
This script allows you to switch FireMobileSimulator status from Vimperator CLI.
@kasei-san
kasei-san / gist:4632635
Created January 25, 2013 07:59
rubyで、URI.unescapeするワンライナー
ruby -r uri -ne 'puts URI.unescape $_.chomp'
@kasei-san
kasei-san / application.rb
Last active December 11, 2015 08:58
RSpec on Railsで、controllerで使うライブラリのテストをする (環境 : ruby 1.9.2, rails : 3.0.9, rspec-rails : 2.1.12)
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# If you have a Gemfile, require the gems listed there, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
module AppLibTest
class Application < Rails::Application
@kasei-san
kasei-san / test.js
Created July 28, 2015 22:46
関数・メソッド・コンストラクタ
function test(){ // 関数
console.log("test");
}
function Animal(type, voice){ // コンストラクタ
this.type = type;
this.bark = function(){ // メソッド
console.log(voice);
};
}