Skip to content

Instantly share code, notes, and snippets.

View scabbiaza's full-sized avatar

Tatiana Kleshnina scabbiaza

View GitHub Profile
@scabbiaza
scabbiaza / be-challange.md
Last active October 28, 2022 16:07
BE challenge

Problem Statement

Develop an API endpoint to get a list of users.

Requirements to DB

DB should have at least 1MM records.

Requirements to API

@scabbiaza
scabbiaza / t1.js
Created May 27, 2019 09:18
Interview JS task
// Get list of prices of saled products that are below 1000, ordered by ASC
var sales = [
{id: 1, price: "500"},
{id: 2, price: "1500"},
{id: 3, price: "750"},
{id: 4, price: "1750"},
{id: 5, price: "150"},
{id: 3, price: "750"},
];
@scabbiaza
scabbiaza / css-questions.md
Last active February 12, 2018 10:40
CSS interview questions
  1. Difference between px, em, rem
<style>
  html, body {
    font-size: 10px;
  }
  div {
    font-size: 15px;
 }
@scabbiaza
scabbiaza / notes.md
Last active August 9, 2017 14:02
SEO FM course notes

Traditional SEO

  • making it easy for crawlers do their job
  • increae the content's quality
  • unique and targeted content, including relevant keyword in content
  • richness of content (videos, image) -- to increase time spending/descreas bounce rate
  • fresh content, frequent updates
  • link building
  • keywords (used to work), overused strategy
@scabbiaza
scabbiaza / codemirror.js
Created March 5, 2017 10:28
Webpack Code Splitting
import {concat, filter, find, isEmpty, intersection, keys, map, not, reduce, uniq} from "ramda";
let theme = "paqmind";
let codemirrorModes = {
"css": ["css"],
"clojure": ["clj", "clojure"],
"javascript": ["js", "javascript", "es"],
"jinja2": ["jinja2"],
"haskell": ["hs", "haskell"],
"htmlmixed": ["html"],
let R = require("ramda");
let data = [
{id: "6", manufacturer: "Russia"},
{id: "5", manufacturer: "USA"},
{id: "3", manufacturer: "China"},
{id: "2", manufacturer: "USA"},
{id: "4", manufacturer: "Russia"},
{id: "1", manufacturer: "RUSSIA"},
{id: "1", manufacturer: "Xyz"},
<div class="container">
<div class="sprite">
<p>
Test
</p>
</div>
</div>
<style>
.container {

npm vs Yarn. Performance test on the real project

$ npm i

from package.json: 3m 17s
from shrinkwrap:   2m 56s

$ yarn

// Sequence of promises
let promise = Q();
let result = [];
R.forEach(page => {
promise = promise.then(r => {
result = R.merge(r, result);
return fetch(page);
});
}, R.range(0, pages));
@scabbiaza
scabbiaza / bigO.js
Last active August 3, 2016 06:30
Sort algorithms written in JS
var R = require("ramda");
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function generateNumberList(size) {
return R.map(i => getRandomInt(0, size), R.range(0, size));
}