Skip to content

Instantly share code, notes, and snippets.

View andriytyurnikov's full-sized avatar

Andriy Tyurnikov andriytyurnikov

View GitHub Profile
<!--
This example requires some changes to your config:
```
// tailwind.config.js
module.exports = {
// ...
plugins: [
// ...
require('@tailwindcss/forms'),
<button type="button" class="rounded-full bg-indigo-600 p-1 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon">
<path d="M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z" />
</svg>
</button>
<button type="button" class="rounded-full bg-indigo-600 p-1.5 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600">
<svg class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon">
<path d="M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z" />
</svg>
</button>
@andriytyurnikov
andriytyurnikov / sane_badge.rb
Last active April 15, 2024 11:53
badge helper
def sane_badge(color:, &block)
color = color
color_classes = case color
when :red, :green, :blue
"border-#{color}-border text-#{color}-text"
end
default_classes = "whatever"
@andriytyurnikov
andriytyurnikov / cost.md
Last active February 23, 2024 16:42
Marketplace participation cost scenarios

Setting: 10 buyers, 10 sellers, NO seller profile notification, NO offer rejection notification

Persona: Buyer

Effort: 1 order per month per Buyer Total effort for all Buyers: 10 orders Visits: 2-10 - create order, see offer, react

Total visits by all buyers: 20-200

Persona: Seller

Effort: 10 offers per month per Seller Visits: 30+ , untill order is found, then to create offer, then to check for result, then wait for next offer

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andriytyurnikov
andriytyurnikov / NO_INFO_LOSS.md
Created October 10, 2023 15:30
Design of systems without loss of information.

Design of information systems without loss of information

Problem: Traditional systems built on RDBMS suffer from loss of (potentially valuable) information. Information system, is a system which recieves Inputs, Transforms them somehow, and then stores derived State. It is important to highlight, that while system evolves schema of Inputs may change, code of Transformers may change, and State may change.

Solutions:

@andriytyurnikov
andriytyurnikov / ds_failures.txt
Last active September 15, 2021 14:39
Design Systems as single source of truth: common failures.
Design Systems as single source of truth: common failures.
TLDR:
Names should be practically unambiguous.
Namespacing should be based on rules - you may change them, but have them explicitly stated,
so if you reshape your namespaces - only reason is that you gained new understanding of priorities.
Source code repositories should have one 'main' branch for reason. You've been warned.
Dependency structure should be discoverable. Dependency roots are more important than edge.
@andriytyurnikov
andriytyurnikov / simulate_a_b.rb
Last active April 20, 2021 14:48
A/B test simulation
def simulate_a_b
sizes = [1_000, 10_000, 100_000]
funded_distribution = [500, 500, 500, 500, 600, 700, 800, 1000, 1500, 2000]
convertion_rate = 0.03
results = {}
results = {
a: {visits: 0, funded: 0, converted: 0},
b: {visits: 0, funded: 0, converted: 0},
}