Build ipa with xcrun

xcodebuild -sdk iphoneos7.0
zip -r build/darkdistrict.app.dSYM.zip build/darkdistrict.app.dSYM/
xcrun -sdk iphoneos PackageApplication -v build/darkdistrict.app -o ${IOS_PLAYER_FOLDER}/build/darkdistrict.ipa

http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/

Caputre an IOS screenshot with UIAtuomation Instruments

This piece of script can do the job (inside UIAutomation Instruments):


var target = UIATarget.localTarget();
target.delay(5)
target.captureScreenWithName("1234.png")
target.delay(2)
target.tap({x:478.00, y:571.00})
target.tap({x:326.00, y:443.00})
target.delay(40)
target.captureScreenWithName("1234.png")
target.delay(2)

On tricky thing to notice is:

 you MUST add target.delay after the screenshot function, 
otherwise the screenshot will be empty. 

Also reference this link: http://www.smallte.ch/blog-read_en_29001.html

RSpec notes (copied from other websites)

Rails and RSpec equality tests have a variety of choices.

Rails 3.2 ActiveRecord::Base uses the == equality matcher.

It returns true two different ways:

If self is the same exact object as the comparison object
If self is the same type as the comparison object and has the same ID
Note that ActiveRecord::Base has the == method which is aliased as eql?. This is different than typical Ruby objects, which define == and eql? differently.

RSpec 2.0 has these equality matchers in rspec-expectations:

a.should equal(b) # passes if a.equal?(b)
a.should eql(b) # passes if a.eql?(b)
a.should == b # passes if a == b
RSpec also has two equality matchers intended to have more of a DSL feel to them:

a.should be(b) # passes if a.equal?(b)
a.should eq(b) # passes if a == b
In your example you’re creating a record then finding it.

So you have two choices for testing #find_by_name:

To test if it retrieves the exact same object OR an equivalent Person record with the same ID, then use should == or its equivalent a.should eql or its DSL version should eq

To test if it uses the exact same object NOT an equivalent Person record with the same ID, then use should equal or its DSL version should be

And difference between == eql equal

http://stackoverflow.com/questions/7156955/whats-the-difference-between-equal-eql-and

Work with multiple SSH session by csshX

csshX is a tool to allow simultaneous control of multiple SSH sessions. csshX will attempt to create an SSH session to each remote host in separate Terminal.app windows. A master window will also be created. All keyboard input in the master will be sent to all the slave windows.

Download link: https://code.google.com/p/csshx/

An very simple example:

 csshx --login tester hostname1.com hostname2.com hostname3.com hostname4.com