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 / gist:1465125
Created December 12, 2011 05:22
AppleScript to migrate from Things to Omnifocus
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
tell application "Things"
-- Loop through ToDos in Things
repeat with aToDo in to dos of list "Next"
@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
<?php
/*
* Podcast URL Extractor
* implemented at http://itunes.so-nik.com
*
* All code has been re-written by lasavior.
* Original code & inspiration from Michael Sitarzewski, zerologic.com
*
* Ex: http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wa/viewPodcast?id=269238657

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

Введение

Начать стоит отсюда. Не пугайтесь то, что это книга по незнакомой OS, эти термины практически везде одинаковые и здесь они изложены в понятной для начинающих форме.

http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html

Прочесть нужно треть главы до подраздела "Starting a process", если С не пугает, читайте полностью. После прочтения вы будете понимать, что такое process, thread, mutex, priorites, semaphores, scheduler, contex-switch, kernel states.

Ruby