Skip to content

Instantly share code, notes, and snippets.

View aderyabin's full-sized avatar
👨‍💻
building something new

Andrey Deryabin aderyabin

👨‍💻
building something new
View GitHub Profile

Мобильное приложение

  • JWT токен генератор

    • Запрос на генерацию JWT токена (mobile)
    • Контроллер который генерирует JWT токен и отдает Payment Profile (STF)
  • Регистрация фейкового заказа с предварительной авторизацией

    • Запрос на получение идентификатора платежа в платежной системе (mobile)
    • Ручка на запрос фейк заказа (Secure Cards)
      • Success
  • Failure

@aderyabin
aderyabin / cohort.sql
Created September 20, 2022 07:56 — forked from bassemawhoob/cohort.sql
Revenue Retention Cohort Analysis - Postgres
-- Based on: https://medium.com/quick-code/how-to-write-sql-to-calculate-user-cohort-retention-a1b3b57c7a2f
-- Uses DATE_PART instead of DATE_DIFF as it is not supported by Postgres
-- (branch_id, scheduled_for, total_cents)
WITH activities AS (
SELECT branch_id, scheduled_for, total_cents
FROM orders
WHERE orders.status = 'complete'
),
-- (branch_id, cohort_month): cohort month is the first order date
@aderyabin
aderyabin / Gemfile
Created July 4, 2020 20:29 — forked from dhh/Gemfile
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
def get_pr_text(input)
result = input.split("\n").map do |line|
task_regex = /((BACKEND\-[0-9]+)\.)?([\s\w]+)(\(#\d+\))?/
regex = /(#\d+)|((BACKEND\-[0-9]+))/
next unless line.match?(regex) #|| line.match?(merge_commit)
if line.match?(task_regex)
num = line.match(task_regex)[2]
text = line.match(task_regex)[3].to_s.strip
ya = "([#{num}](https://tracker.yandex.ru/#{num}))" if num

Keybase proof

I hereby claim:

  • I am aderyabin on github.
  • I am aderyabin (https://keybase.io/aderyabin) on keybase.
  • I have a public key whose fingerprint is 2559 780B B86A 6CAD 6B8A 00B4 5890 D630 DB7F 7207

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am aderyabin on github.
  • I am aderyabin (https://keybase.io/aderyabin) on keybase.
  • I have a public key ASAE3w28-Mxc_Uf9KTwCCRfviqo-CZeiOedA7dzKXbr79Ao

To claim this, I am signing this object:

@aderyabin
aderyabin / sketch-never-ending.md
Created July 7, 2017 18:03 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aderyabin
aderyabin / README.md
Last active August 29, 2015 14:18 — forked from mbostock/.block

This histogram shows the distribution of GitHub Gist API response times (in milliseconds) for a sample of 10,000 requests as observed by bl.ocks.org.

The distribution roughly follows a log-normal distribution, which is unsurprising for a complex process that has multiple independently-random sources of delay. The mode response time was in the range 120-140ms, while the median response time was 206ms. The middle 80% of requests were in the range 114-527ms. About 11% of requests took longer than 500ms, and 5% of requests took longer than one second. (The rightmost bin in the histogram includes these long requests.)

Since API endpoints vary dramatically in their computational cost, the distribution of response times is likely multimodal. In this dataset, 96% of requests were for a single gist (/gists/42), while the remaining 4% of requests were to list a user’s gist (/users/fred/gists). By separating the API requests for a single

[
{
"description": "Evaluating get.",
"duration(ms)": 3.182579,
"sub_tasks": [
{
"description": "Evaluating table.",
"duration(ms)": 0.060452,
"sub_tasks": [
{