Skip to content

Instantly share code, notes, and snippets.

View qWici's full-sized avatar

Ivan Kucher qWici

View GitHub Profile
@qWici
qWici / example.ts
Last active December 6, 2021 13:34
import { InfiniteScroll } from "@components/infinite-scroll";
import React, { createRef, useState } from "react";
import { useTranslation } from "react-i18next";
import { PageHeader } from "@components/page-header";
import { ContentGrid } from "@components/content-grid";
import { ArticleItem } from "@components/content-items/article";
import { VideoItem } from "@components/content-items/video";
import { PodcastItem } from "@components/content-items/podcast";
import { getFakeItems } from "@/helpers/getFakeItems";
import { ContentItem } from "@/global-types";
4.52,1.76,38.06,1.19,4.42,2.98,1.02,3.23,2.31,17.75, 3.99,1.34,12.45,14.6,1.67,4.36,1.17,2.36,1.23,3.95, 1,14.39,16.32,1.93,1.09,2.05,6.08,6.97,2.17,1.21, 1.74,9.29,1.35,1.53,20.91,7.86,12.14,1.22,2.83,2.4, 4.41,6.64,3.19,4.47,13.7,13.84,2.44,2.24,55.91,2.35, 1.39,1.17,1.55,1.61,1.29,1.67,1.12,2.34,5.36,78.95, 3.56,2.06,2.54,2.52,1.72,2.27,1.17,3.17,6.35,1.08, 1.24,4.5,1.9,6.25,3.68,2.44,2.84,1.3,1.52,1.74, 1.3,1.25,53.09,1.59,1.09,1.21,1.09,1.01,1.27,2.25, 3.8,1.3,3.49,1.57,5.31,2.11,1.57,1.05,1.67,16.53, 1.26,2.24,2.12,2.53,1.01,3.43,1.97,1.08,1.65,1.87, 1.12,2.79,2.84,3.32,2.13,1.57,2.7,2.67,3.85,1.48, 1.99,1.66,1,3.12,3.21,1.06,4.98,1.48,4.34,26.08, 1.61,1.18,1.97,3,1.06,1.16,1.12,10.29,1.57,1.29, 1.44,1.43,1.08,1.09,1.68,1.1,2.16,1.34,3.24,1.07, 1.36,8.04,4.47,1.26,4.14,1.22,1.07,1.94,144.15,1.19, 4.46,1.03,1,1.05,6.47,1.39,1.63,5.72,9.76,1.48, 1.98,1.21,1.22,11.95,1.05,2.92,4.8,1.86,1.34,1.39, 1.28,1.94,3.32,2.82,1.49,5.54,2.82,52.45,1.09,3.95, 3.14,1.36,1.94,1.08,5.33,4.91,2.36,2.61,2.87,1.95, 5.07,1.5

Задача

Необхідно зверстати адаптивну сторінку зі списком фотографій. ​

При кліку на фотографію відкривається модальне вікно з фотографією, списком коментарів і формою додавання коментарів. ​

Список запитів:

{
"workbench.colorTheme": "Material Theme Palenight High Contrast",
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"explorer.confirmDelete": false,
"git.autofetch": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
@qWici
qWici / hero.controller.spec.ts
Created June 25, 2019 17:07
Testing controller with jest
import { Test, TestingModule } from '@nestjs/testing';
import { HeroController } from './hero.controller';
import { HeroService } from './hero.service';
import { Hero } from './hero.entity';
import { PrimaryAttribute } from './hero.primary-attribute';
import { Repository } from 'typeorm';
import { NotFoundException } from '@nestjs/common';
describe('Hero Controller', () => {
let controller: HeroController;
@qWici
qWici / code.js
Created May 4, 2019 18:27
Add jQuery to a third party web site
function l(u, i) {
var d = document;
if (!d.getElementById(i)) {
var s = d.createElement('script');
s.src = u;
s.id = i;
d.body.appendChild(s);
}
}
l('//code.jquery.com/jquery-3.2.1.min.js', 'jquery')
@qWici
qWici / wilsonScore.js
Created May 2, 2019 14:05
wilsonScore
// https://www.evanmiller.org/how-not-to-sort-by-average-rating.html
const wilsonScore = (up, down) => {
if (!up) return 0
const n = up + down
const z = 1.64485 // 1.0 = 85%, 1.6 = 95%
const phat = up / n
return (phat + ((z * z) / (2 * n)) - (z * Math.sqrt(((phat * (1 - phat)) + (z * z / (4 * n))) / n))) / (1 + (z * z / n))
}
@qWici
qWici / Result
Last active April 26, 2019 14:09
steamdb.info
10, 20, 30, 40, 50, 60, 70, 80, 92, 100, 120, 130, 210, 220, 240, 280, 300, 304, 320, 340, 360, 380, 400, 420, 440, 480, 490, 500, 520, 530, 550, 570, 580, 620, 630, 659, 700, 710, 720, 730, 790, 817, 841, 852, 882, 1001, 1002, 1200, 1210, 1230, 1250, 1270, 1280, 1300, 1309, 1313, 1320, 1500, 1504, 1510, 1520, 1525, 1530, 1600, 1610, 1620, 1630, 1640, 1670, 1690, 1700, 1820, 1860, 1900, 1920, 1930, 2100, 2110, 2115, 2130, 2200, 2210, 2270, 2280, 2290, 2300, 2310, 2320, 2330, 2340, 2350, 2360, 2370, 2390, 2400, 2410, 2413, 2420, 2430, 2450, 2500, 2520, 2525, 2540, 2545, 2550, 2570, 2590, 2600, 2610, 2620, 2630, 2640, 2680, 2690, 2700, 2710, 2720, 2750, 2760, 2780, 2790, 2800, 2810, 2820, 2830, 2840, 2850, 2870, 2900, 2910, 2920, 2930, 2950, 2990, 3000, 3010, 3020, 3030, 3040, 3050, 3130, 3150, 3160, 3170, 3200, 3220, 3230, 3260, 3270, 3300, 3310, 3320, 3330, 3340, 3350, 3360, 3370, 3380, 3390, 3400, 3410, 3420, 3430, 3440, 3450, 3460, 3470, 3480, 3483, 3490, 3500, 3510, 3520, 3530, 3540, 3550, 3560, 3570, 3580
@qWici
qWici / todo.md
Last active August 4, 2020 10:17
What to do after install Ubuntu
  1. Update the system
sudo apt update && sudo apt upgrade
  1. Enable additional repositories for more software

Software & Updates -> Other Software -> Canonical Partners

  1. Download Chrome
  2. Add languages & setup keybinding