- Keep them short, but appropriate to the action that is happening
- (defaults to 300ms on Android for property animator)
- Keep them smooth
- Don't run layout during animation! Do it first.
- Use the right timing curve
- Keep them natural
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "failure" do | |
it "should not make a new user" do | |
lambda do | |
visit signup_path | |
fill_in "Name", :with => "" | |
fill_in "Email", :with => "" | |
fill_in "Password", :with => "" | |
fill_in "Confirmation", :with => "" | |
click_button | |
response.should render_template('users/new') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
class I | |
def self.♥(thing) | |
puts "I ♥ #{thing}" | |
end | |
end | |
I.♥ "Ruby" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Managing a user session | |
In order to manage my session with the site | |
As a user | |
I should be able to sign in and sign out | |
Scenario: Navigate to the sign in page | |
Given I am not signed in | |
And I am on the home page | |
When I follow "Sign in" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe User, 'as creator' do | |
subject { Factory(:user) } | |
let(:object) { mock 'arbitrary object' } | |
it "did not create another object when the object does not have a creator_id" do | |
subject.should_not be_creator_of(object) | |
end | |
it "did not create another object when the object's creator_id does not match" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rake task overriding, with original task calling. Found here: | |
# | |
# http://metaskills.net/2010/05/26/the-alias_method_chain-of-rake-override-rake-task/ | |
Rake::TaskManager.class_eval do | |
def alias_task(fq_name) | |
new_name = "#{fq_name}:original" | |
@tasks[new_name] = @tasks.delete(fq_name) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hourPaint = new Paint(); | |
hourPaint.setARGB(255, 200, 200, 200); | |
hourPaint.setStrokeWidth(6F); | |
hourPaint.setAntiAlias(true); | |
hourPaint.setStrokeCap(Paint.Cap.ROUND); | |
// ... | |
float hrX = (float) Math.sin(hrRot) * hrLength; | |
float hrY = (float) -Math.cos(hrRot) * hrLength; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FATAL EXCEPTION: main | |
java.lang.RuntimeException: Unable to instantiate application com.speek.SpeekApplication: java.lang.NullPointerException | |
at android.app.LoadedApk.makeApplication(LoadedApk.java:501) | |
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4124) | |
at android.app.ActivityThread.access$1300(ActivityThread.java:130) | |
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255) | |
at android.os.Handler.dispatchMessage(Handler.java:99) | |
at android.os.Looper.loop(Looper.java:137) | |
at android.app.ActivityThread.main(ActivityThread.java:4745) | |
at java.lang.reflect.Method.invokeNative(Native Method) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
config secondsBetweenRepeat 0.1 | |
config checkDefaultsOnLoad true | |
config focusCheckWidthMax 3000 | |
config windowHintsShowIcons true | |
config windowHintsIgnoreHiddenWindows false | |
config windowHintsSpread true | |
# config keyboardLayout dvorak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
config secondsBetweenRepeat 0.1 | |
config checkDefaultsOnLoad true | |
config focusCheckWidthMax 3000 | |
config windowHintsShowIcons true | |
config windowHintsIgnoreHiddenWindows false | |
config windowHintsSpread true | |
# config keyboardLayout dvorak |
OlderNewer