Skip to content

Instantly share code, notes, and snippets.

View RadiationX's full-sized avatar
💭
I may be slow to respond.

Evgeny Nizamiev RadiationX

💭
I may be slow to respond.
View GitHub Profile
@RadiationX
RadiationX / authmanager.php
Last active January 17, 2018 03:58
Bitrix фикс слетающей авторизации через соцсеть
Файл: bitrix/modules/socialservices/classes/general/authmanager.php
Примерно строка 1241, добавляем параметр "true" для вызова метода AuthorizeWithOtp
...
$USER->AuthorizeWithOtp($USER_ID, true);
...
@RadiationX
RadiationX / Undo_Redo android
Created January 14, 2017 17:08 — forked from kidinov/Undo_Redo android
Undo/Redo with batches for any TextView descendant.
/*
* THIS CLASS IS PROVIDED TO THE PUBLIC DOMAIN FOR FREE WITHOUT ANY
* RESTRICTIONS OR ANY WARRANTY.
*/
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.text.Editable;
import android.text.Selection;
import android.text.TextUtils;
@RadiationX
RadiationX / vkontakte.php
Created March 3, 2018 04:35
Фикс авторизации через ВКонтакте, Bitrix. Версия модуля: 15.5.0
<?
IncludeModuleLangFile(__FILE__);
class CSocServVKontakte extends CSocServAuth
{
const ID = "VKontakte";
const CONTROLLER_URL = "https://www.bitrix24.ru/controller";
protected $entityOAuth = null;
recyclerView.apply {
layoutManager = LinearLayoutManager(context)
adapter = this@ParkingVehicleFragment.adapter
val swipeHandler = ParkingVehicleItemDelegate.ItemTouchHelperExtensionCallback()
ItemTouchHelperExtension(swipeHandler).attachToRecyclerView(recyclerView)
}
class ItemTouchHelperExtensionCallback : ItemTouchHelperExtension.Callback() {
override fun getMovementFlags(recyclerView: RecyclerView?, viewHolder: RecyclerView.ViewHolder?): Int {
if (!(viewHolder is ViewHolder)) return 0
package ru.istra.rentspec.data.repository.media
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Matrix
import io.reactivex.Completable
import io.reactivex.Single
import okhttp3.MultipartBody
import okhttp3.RequestBody
import ru.istra.rentspec.data.entity.media.ImageItem
class ChatResponse(
@SerializedName("chatId") val id: Long, // Очевидно
@SerializedName("count") val count: Int?, // Тоже в принципе
@SerializedName("lastMessage") val lastMessage: ChatMessageResponse?, // Последнее сообщение, используется в СПИСКЕ чатов. null в чате
@SerializedName("messages") val messages: List<ChatMessageResponse>?, // Сообщения в самом чате. null в списке чатов
@SerializedName("deletedIds") var deletedIds: List<Long>?, // Массив удаленных сообщений. Составляется относительно lastsync
@SerializedName("author") var author: UserResponse? // Юзер, автор чата
)
class ChatMessageResponse(
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Just a moment please...</title>
<meta name="description" content="">
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href='https://fonts.googleapis.com/css?family=Roboto:100,300' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
@RadiationX
RadiationX / первый запрос на сайт
Created June 23, 2018 11:23
другой блейзингфаст
Кукис в ответ
BlazingWebCookie gF4mESuGqIR8M1SriTXY8crEbGaHy53mf5415G4cqVbb6lQCZ7VtRV5OdEXrfHgS .anilibria.tv / 2018-06-30T11:16:32.000Z 148
Ответ
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Just a moment please...</title>
<meta name="description" content="">
open class CustomNavigator(
activity: FragmentActivity?,
containerId: Int
) : SupportAppNavigator(activity, containerId) {
override fun createActivityIntent(context: Context?, screenKey: String?, data: Any?): Intent? {
return (data as? Screen)?.let { createActivityIntent(context, it) }
}
override fun createFragment(screenKey: String?, data: Any?): Fragment? {