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
/** | |
* The method add default method [handleError] for handle onError evert from the ObservableSource, | |
* and add disposable from this subscribe to CompositeDisposable [compositeDisposable] | |
* | |
* @param onNext - the function you have designed to accept emissions from the ObservableSource | |
*/ | |
protected fun <T> Observable<T>.safeSubscribe(onNext: (T) -> Unit, onError: (Throwable) -> Unit = ::handleError) { | |
this.subscribe(onNext, onError) | |
.addToCompositeDisposable() | |
} |
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
scp Desktop/web/src/main/resources/* root@167.99.94.185:/var/www/schoolhelper.tech/blog/vpn | |
scp -r src/main/resources/blog root@167.99.94.185:/var/www/schoolhelper.tech | |
### deploy | |
gradle bootJar & ssh root@schoolhelper.tech "mkdir -p /root/backend/build/libs/" & scp docker-compose.yml root@schoolhelper.tech:/root/backend/ & scp Dockerfile root@schoolhelper.tech:/root/backend/ & scp build/libs/backend-0.0.1-SNAPSHOT.jar root@schoolhelper.tech:/root/backend/build/libs/backend-0.0.1-SNAPSHOT.jar & ssh root@schoolhelper.tech "cd backend && docker-compose up -d" |
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
sdk.dir=/Users/volodymyrstelmashchuk/Library/Android/sdk |
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
ssh-keygen | |
pbcopy < ~/.ssh/id_rsa.pub |
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
//View interface | |
interface MainView : MvpView { | |
@StateStrategyType(AddToEndSingleStrategy::class) | |
fun printLog(msg: String) | |
} | |
//View implementation | |
class MainActivity : MvpAppCompatActivity(), MainView { | |
@InjectPresenter |
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
ssh-keygen | |
pbcopy < ~/.ssh/id_rsa.pub |
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
pbcopy < ~/.ssh/id_rsa.pub |
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
CID=$(docker run -d --restart=always --privileged -p 1194:1194/udp -p 443:443/tcp umputun/dockvpn) && docker run -t -i -p 8080:8080 --volumes-from $CID umputun/dockvpn serveconfig |
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
interface SomeViewInterface : MvpView { | |
... | |
@StateStrategyType(OneExecutionStateStrategy::class) | |
fun showSomeFragment(someArgumentIfYouNeed : Int) | |
} |
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
interface SomeViewInterface : MvpView { | |
... | |
@StateStrategyType(AddToEndSingleStrategy::class) | |
fun showSomeData(someData : Foo) | |
} |
OlderNewer