I hereby claim:
- I am trevorrjohn on github.
- I am trevorrjohn (https://keybase.io/trevorrjohn) on keybase.
- I have a public key ASCm2yttO3fQsLFF0hWQmJ6aEJRCCWliON8GUYN-Le0uOQo
To claim this, I am signing this object:
| TestSub<Repo> testSub = new TestSub(); | |
| when(service.getRepo(anyString())) | |
| .thenReturn(Observable.onCreate(testSub)); | |
| activity.onCreate(null); | |
| testSub.onNext(new Repo("RxAndroid")); | |
| assertThat(repoView).hasText("RxAndroid"); |
| service.getRepo("123") | |
| .subscribeOn(Schedulers.io()) | |
| .observeOn(AndroidSchedulers.mainThread()) | |
| .subscribe( | |
| repo -> | |
| repoView.setText(repo.getName()), | |
| e -> { /* show some error message */ } | |
| ); | |
| Observable.create(OnSubscribe<T> onSubscribe); | |
| public interface OnSubscribe<T> { | |
| void call(Subscriber<T> subscriber); | |
| } | |
| public abstract class Subscriber<T> | |
| implements Observer<T>, Subscription { /**/ } |
| PublishSubject<Repo> subject = | |
| PublishSubject.create(); | |
| when(service.getRepo(anyString()) | |
| .thenReturn(subject.asObservable()); | |
| activity.onCreate(null); | |
| subject.onNext(new Repo("Subject!")); |
I hereby claim:
To claim this, I am signing this object:
| # brew install reattach-to-user-namespace | |
| # https://robots.thoughtbot.com/how-to-copy-and-paste-with-tmux-on-mac-os-x | |
| set-option -g default-command "reattach-to-user-namespace -l bash" | |
| # Act like Vim | |
| set-window-option -g mode-keys vi | |
| bind-key h select-pane -L | |
| bind-key j select-pane -D | |
| bind-key k select-pane -U | |
| bind-key l select-pane -R |
| # config/initializers/graphql_boolean_parameter.rb | |
| # frozen_string_literal: true | |
| GraphQL::BOOLEAN_TYPE.class_eval do | |
| REGEX = /^(true|false|t|f|0|1)$/ | |
| define_method(:validate_input) do |value, ctx| | |
| super(coerce_input(value, ctx), ctx) | |
| end |
| .relationship-list-item:hover { | |
| a { | |
| text-decoration: none !important; | |
| } | |
| .relationship-list-icon { | |
| background: lighten($secondary-color, 15%); | |
| } | |
| &.selected { | |
| border-left: 5px solid darken($secondary-color, 10%); | |
| .relationship-list-icon { |
| .relationship-list-item a { | |
| text-decoration: none !important; | |
| } | |
| .relationship-list-item:hover { | |
| border-left: 5px solid lighten($secondary-color, 15%); | |
| } | |
| .relationship-list-item:hover .relationship-list-icon { | |
| background: lighten($secondary-color, 15%); |
Context: "User A" has a password in a text file that he needs to share with "User B".
openssl% brew update && brew install openssl