Skip to content

Instantly share code, notes, and snippets.

View kiurchv's full-sized avatar

Myroslav Kiurchev kiurchv

View GitHub Profile
@kiurchv
kiurchv / One-line text editor
Created January 29, 2013 23:44
Just paste this in your address bar
data:text/html, <link href="http://hallojs.org/css/bootstrap.css" rel="stylesheet"><link rel="stylesheet" href="http://hallojs.org/css/font-awesome/css/font-awesome.css"><link rel="stylesheet" href="http://hallojs.org/css/hallo.css"><link rel="stylesheet" href="http://hallojs.org/css/jquery-ui-bootstrap/jquery-ui-1.8.16.custom.css"><script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script><script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script><script type="text/javascript" src="http://hallojs.org/js/hallo.js"></script><script>$(function () {$('body').hallo({plugins: {'halloformat': {},'halloblock': {},'hallojustify': {},'hallolists': {}}});})</script><body>
@kiurchv
kiurchv / plurailze.coffee
Last active December 14, 2015 10:19
CoffeeScript implementation of pluralize method for russian language
Number::pluralize = (f1, f2, f3) ->
if this % 10 == 1 && this % 100 != 11
"#{this} #{f1}"
else if this % 10 >= 2 && this % 10 <= 4 && (this % 100 < 10 || this % 100 >= 20)
"#{this} #{f2}"
else
"#{this} #{f3}"
@kiurchv
kiurchv / BaseModel.php
Last active December 16, 2020 03:52
ORM implementation
<?php
/**
* ORM implementation.
*
* BaseModel realizes all logic for managing database connections and
* work with entities which stored in database as plain PHP objects.
*
* This implementation supports object relations:
*
* * one to one
ul {
list-style: none;
}
ul li {
display: inline;
}
ul li:before {
content: '\2606';
}
ul[data-rating="1"] li:nth-child(1):before {
@kiurchv
kiurchv / patronymic.rb
Created December 24, 2014 05:26
Patronymic class for Ukrainian language
class Patronymic
EXCEPTIONS = {
"Микола" => ["Миколайович", "Миколаївна"],
"Григорій" => ["Григорович", "Григорівна"],
"Хома" => ["Хомич", "Хомівна"],
"Ілля" => ["Ілліч", "Іллівна"],
"Яків" => ["Якович", "Яківна"],
"Сава" => ["Савович", "Савівна"]
}
#!/bin/bash
cat > delimiter.rtf <<EOF
{\\rtf1\\ansi\\ansicpg1251\\cocoartf1344\\cocoasubrtf360
{\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;}
{\\colortbl;\\red255\\green255\\blue255;}
\\paperw11900\\paperh16840\\margl1440\\margr1440\\vieww10800\\viewh8400\\viewkind0
\\pard\\tx566\\tx1133\\tx1700\\tx2267\\tx2834\\tx3401\\tx3968\\tx4535\\tx5102\\tx5669\\tx6236\\tx6803\\pardirnatural
\\f0\\fs24 \\cf0 \\
}

Keybase proof

I hereby claim:

  • I am kiurchv on github.
  • I am kiurchv (https://keybase.io/kiurchv) on keybase.
  • I have a public key ASBMnMxAlwkcV7_C0Srb3vtrvS4admr2HjkSKvQLEpwbowo

To claim this, I am signing this object:

Scenario: Get toCreateRequestContent field
Given capitation contract with the following fields exist:
| field | value |
| databaseId | "8b9482fe-6cb6-4855-a923-7ccd4d9b7aef" |
| contractNumber | "0000-9EAX-XT7X-3115"
Feature: Get specific capitation contract
Scenario: Get toCreateRequestContent field
Given there are 2 legal entities exist
And there are 2 employees are associated with legal entities accordingly
And a capitation contract with the following fields are associated with first legal entity as nhsLegalEntity and second legal entity as contractorLegalEntity and first employee as nhsSigner and second employee as contractorOwner:
| field | value |
| databaseId | "8b9482fe-6cb6-4855-a923-7ccd4d9b7aef"
@kiurchv
kiurchv / machine.js
Created August 10, 2020 16:07
Generated by XState Viz: https://xstate.js.org/viz
const landingMachine = Machine({
id: "Landing",
initial: "Welcome",
// TODO: Describe context
context: {},
states: {
Welcome: {
on: {
FORWARD: "ProductInfo"
}