Skip to content

Instantly share code, notes, and snippets.

View klinkin's full-sized avatar

Mike Klimin klinkin

View GitHub Profile
@klinkin
klinkin / task1.md
Last active November 14, 2018 19:23

Первая задача:

Есть файлик с миллиардом строк, каждая строка json. Есть супер надежный endpoint, который может в 100500 rps, но принимает только один json за один POST запрос.

Данные в исходном json могут быть немного перепутаны. Если порядок строки неверный, сервер ответит HTTP 406 и строку нужно попробовать отправить немного позже.

В итоге нужно послать весь файл не больше чем 60 мин.

@klinkin
klinkin / device.md
Last active October 23, 2017 16:29
Пользовательское API сервиса Quelle.ru

Registers a new device on the server

(en) This method registers a user's device on the server when a user launches an application at the first time. After the registration the server sends:

  • unique identificator QUELLE-DUID in the UUID format
  • JWT token generated on the base of QUELLE-DUID

(ru) Метод для регистрации устройства пользователя на сервере при запуске первом запуске приложения.

@klinkin
klinkin / products.md
Last active October 23, 2017 09:34
Products Resource

List products with all available filter parameters

Request

REQUSET: 
  TYPE:
    POST 
  PATH:
 api.quelle.ru/cnt/v1/products?nav_id=123&page=2&per_page=100
@klinkin
klinkin / brands.md
Last active October 23, 2017 11:09
Get list of brands

List brands

Returns a list of brands divided by groups

Request

REQUSET:
  TYPE: 
    GET
  PATH: 
@klinkin
klinkin / navs.md
Last active October 23, 2017 11:13
Get main Navigation Tree - categories and promoshops

Get Navigation

Response cashed on a device for 24-hour

Запрос

REQUSET: 
  TYPE: 
    GET
 PATH: 
@klinkin
klinkin / ab_test.js
Created February 2, 2017 17:12
GTM ABCD test
<script>
od_test_id = "ABTest-001",
od_twin_id = "",
od_test_name = "Просмотры - Shops",
od_variations_count = 4,
od_exposure_rate = 100,
od_traffic_allocate = [25, 25, 25, 25],
od_cookie_days = 60,
od_cookie_path = "/",
od_analytics = "universal",
...
AVAILABLE_ROLES = [
# STAFF
ADMIN, HEAD_MANAGER, MANAGER,
PAYMASTER, SECURITY, ANALYST,
SUPPORT, CONTENT_MANAGER,
# Partner
@klinkin
klinkin / map.geojson
Last active October 23, 2019 22:56
example geof
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@klinkin
klinkin / index.html
Created September 2, 2015 10:51
Пример редиректа в свой мобильный store
<!doctype html>
<html>
<head>
<title>Установи Едадил и покупай со скидками!</title>
<meta charset="utf-8" />
<script>
var agent = navigator.userAgent.toLowerCase(),
loc;
if (/iphone|ipad|ipod/i.test(agent)) {

Apache Spark installation + ipython notebook integration guide for Mac OS X

Tested with Apache Spark 1.3.1, Python 2.7.9 and Java 1.8.0_45

Install Java Development Kit

Download and install it from oracle.com