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
# read more at https://terrty.net/2014/ssl-tls-in-nginx/ | |
# latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf | |
# security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net | |
# your nginx version might not have all directives included, test this configuration before using in production against your nginx: | |
# $ nginx -c /etc/nginx/nginx.conf -t | |
server { | |
# public key, contains your public key and class 1 certificate, to create: | |
# (example for startssl) | |
# $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null |
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
1 Отличия локальных и глобальных сетей передачи данных (кроме очевидного отличим в | |
размерах)? | |
Основными отличительными признаками локальных сетей от глобальных выступают следующие: | |
степень оперативности обработки запросов; | |
скорость обмена и транспортировки данных; | |
масштабируемость; | |
уровень сложности схемы передачи данных; | |
механизмы прокладки связных линий и их протяженность; | |
разнообразность услуг. |
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
// ==UserScript== | |
// @name Harakiri URL button | |
// @namespace http://ccrowd.in/ | |
// @version 0.0.1 | |
// @description Userscript for easy copying the item URL on http://www.xarakiri.ru/ | |
// @author [email protected] | |
// @match http://www.xarakiri.ru/catalog/* | |
// @grant none | |
// ==/UserScript== | |
/* jshint esnext: true */ |
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
package in.ccrowd.base.database; | |
import com.annimon.stream.Collectors; | |
import com.annimon.stream.Stream; | |
import io.realm.Realm; | |
import io.realm.RealmModel; | |
import io.realm.RealmObject; | |
import rx.functions.Func0; |
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
abstract class DelegatedViewController<T> : ViewController<T> { | |
fun invokeAction(action: DelegatingViewController.DelegatedAction<T>) { | |
action.invoke(this) | |
} | |
} |
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
private abstract class RequestFactoryAdapter<T> { | |
lateinit var paginator: Paginator<T> | |
abstract fun loadPage(page: Int) | |
protected fun onSuccess(data: List<T>) { | |
paginator.currentState.newData(data) | |
} |
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
@JvmStatic | |
fun <T : RealmObject> filterAccess(query: RealmQuery<T>): RealmQuery<T> { | |
val roles = DCUserManager.getRoles().toTypedArray() | |
fun RealmQuery<T>.operationTypeIs(operationType: String) { | |
equalTo(RealmUtil.getField(ModelWithType.FIELD_ACCESS, AccessModel.FIELD_OPERATION), operationType) | |
} | |
fun RealmQuery<T>.hasAnyOfRoles(roles: Array<Int>) { | |
oneOf(RealmUtil.getField(ModelWithType.FIELD_ACCESS, AccessModel.FIELD_ROLES, IntObject.FIELD_VALUE), roles) | |
} |
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
val query: RealmQuery<Model> = ... | |
query.build { | |
group { | |
equalTo(linkedField(Column.PARAMS, Column.FIELD_TYPE), DCParamModel.FieldType.BOOLEAN) | |
and | |
equalTo(linkedField(Column.PARAMS, Column.KEY), DCParamObject.FAVORITE) | |
and | |
equalTo(linkedField(Column.PARAMS, Column.F_BOOL), true) | |
} | |
} |
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 PhoneAuth { | |
fun sendSms(phone: String): Completable | |
fun login(code: String): Completable | |
fun changePhone() | |
fun getPhoneAuthState(): Observable<PhoneAuthState> | |
fun getProgressState(): Observable<ProgressState> | |
fun getErrorState(): Observable<ErrorState> | |
companion object { | |
const val DEFAULT_TIMER = 60L |
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
package com.app.feature.editprofile.di | |
import com.app.feature.editprofile.presenter.EditProfilePresenter | |
import com.app.feature.editprofile.di.EditProfileScope | |
@EditProfileScope | |
interface EditProfileComponent { | |
val editProfilePresenter: EditProfilePresenter | |
} |
OlderNewer