Skip to content

Instantly share code, notes, and snippets.

View katsuyoshi's full-sized avatar

Katsuyoshi Ito katsuyoshi

  • ITO SOFT DESIGN Inc.
  • Akita, Japan
View GitHub Profile
//
// PLCDocumentViewManagerTest2.m
// ioCoreTest
//
// Created by Katsuyoshi Ito on 09/06/23.
// Copyright 2009 ITO SOFT DESIGN Inc. All rights reserved.
//
#import "PLCDocumentViewManagerTest2.h"
#import "UITableViewControllerTestHelper.h"
@interface RootTableViewInEditModeTest : RootTableViewTest {
}
@end
/**
* このテストはRootViewControllerを編集モードにして、
* EditViewControllerに遷移してからのテストをする。
*/
@implementation RootTableViewInEditModeTest
@katsuyoshi
katsuyoshi / like_ruby.h
Created December 4, 2010 04:33
rubyの様にunless untile使いたいだけです
#define unless(s) if (!(s))
#define until(s) while (!(s))
@katsuyoshi
katsuyoshi / install ruby 1.8.7
Created June 5, 2012 08:30
Ruby 1.8.7をMacOSX 10.4 へのインストール
mkdir tmp
cd tmp
curl -O ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p358.zip
unzip ruby-1.8.7-p358.zip
cd ruby-1.8.7-p358
./configure
make
sudo make install
@katsuyoshi
katsuyoshi / Instal rubygems 1.3.7.1
Created June 5, 2012 11:25
Ruby 1.8.7でRubyGemsをインストール
・ https://github.com/rubygems/rubygems/tree/1.3.7.1 のZIPとかかれたボタンを押す。
・自動で解凍されない場合ダウンロード先でダブルクリックで解凍する
・ターミナルで cd まで入れたら上で解凍して出来たフォルダーをターミナルにドラックする。cdの後にはスペースが必要
・以下ターミナルの操作
sudo ruby setup.rb
sudo gem update --system
./configure --enable-pthread --enable-tcltk-framework --enable-macosx-aqua
make
sudo make install
$ sudo motion update
Password:
Connecting to the server...
Downloading software update...
######################################################################## 100.0%
Installing software update...
Software update installed.
= RubyMotion 1.11 =
@katsuyoshi
katsuyoshi / migrate_heorku.rb
Created August 8, 2012 06:54
herokuのmigration
your_app = ARGV[0] || "your_app"
plan = ARGV[1] || "dev"
/(HEROKU_POSTGRESQL_\w+)/ =~ `heroku addons:add heroku-postgresql:#{plan} -a #{your_app}`
db_url = $1
system("heroku addons:add pgbackups -a #{your_app}")
system("heroku maintenance:on -a #{your_app}")
system("heroku pgbackups:capture --expire -a #{your_app}")
system("heroku pgbackups:restore #{db_url} -a #{your_app}")
system("heroku pg:promote #{db_url} -a #{your_app}")
system("heroku maintenance:off -a #{your_app}")
@katsuyoshi
katsuyoshi / nsindexpath_spec.rb
Created August 28, 2012 01:56
spec file for nsindexpath in sugarcube
describe NSIndexPath do
describe "NSIndexPath('0', '1').to_a" do
before do
@subject = ["0", "1"].nsindexpath.to_a
end
it "should be [0, 1]" do
@subject.should == [0, 1]
end
end