Skip to content

Instantly share code, notes, and snippets.

View aMoRRoMa's full-sized avatar

Roman Gafiatullin aMoRRoMa

View GitHub Profile
@aMoRRoMa
aMoRRoMa / How to Do a Clean Restart of a Docker Instance
Created January 11, 2022 09:30
How to Do a Clean Restart of a Docker Instance
Procedure
1. Stop the container(s) using the following command:
docker-compose down
2. Delete all containers using the following command:
docker rm -f $(docker ps -a -q)
3. Delete all volumes using the following command:
docker volume rm $(docker volume ls -q)
4. Restart the containers using the following command:
docker-compose up -d
Questions:
- Who are you? What education? Previous work/projects. Current work/project.
- DOM CSS.
- How JS work? (https://www.youtube.com/watch?v=8aGhZQkoFbQ) Memory Heap, Call Stack, Web API, Event Loop.
- Start new project. Which technology? Why? (Should ask question about project cretarias)
- Optimization of the project with memoized selectors for decorated entities (should split entity and ui state)
@aMoRRoMa
aMoRRoMa / giveMyMoney.js
Created November 1, 2019 08:20 — forked from unilecs/giveMyMoney.js
Task about giving cash from ATM
function giveMyMoney(money, coins) {
let needCoins = [], minCoins = []; minCoins[0] = 0;
// перебираем все суммы до заданной суммы (можно начать с мин.купюры)
for (let sum = 1; sum <= money; sum++) {
// по умолчанию эта сумма не для выдачи
minCoins[sum] = Number.MAX_VALUE;
@aMoRRoMa
aMoRRoMa / factorial.js
Created October 22, 2019 12:53 — forked from ytiurin/factorial.js
Calculate extra large factorial
function factorial(userInt)
{
if(userInt===0)
return '1'
if(!userInt)
return ''
var i, nextNumber, carret,
@aMoRRoMa
aMoRRoMa / interview
Last active September 28, 2023 10:41
Tasks for interview of programmer(Javascript)
// 1. You need to implement function that return array of powers for the number (10min)
const getPowersOfNumber = (number, until) => {
return 'not implemented';
};
// test
const answer = [1, 3, 9, 27];
console.log(
// начальные тесты
var array = [1, 2, 3];
var result = array.reduce2(function (memo, item) {
return item + memo;
});
console.log(result == 6);
var array = [1, 2, 3];
var result = array.reduce2(function (memo, item) {
@aMoRRoMa
aMoRRoMa / multiple_ssh_setting.md
Created July 15, 2017 09:58 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@aMoRRoMa
aMoRRoMa / Test
Last active June 5, 2019 10:37
frontend test app
Создать карту передвижения общественного транспорта в городе Казань(аналог Yandex.Transport). Для этого предоставляется открытое API с данными о передвижении транспорта в реальном времени:
- http://data.kzn.ru/dinamic_datasets/docs
Необходимые условия:
- использование API карт https://leafletjs.com/ || https://tech.yandex.ru/maps/jsapi/ || https://developers.google.com/maps/documentation/;
- Использовать React(Vue);
- изменение положения автобусов на карте осуществляется в реальном времени;
- на основе полученных данных необходимо вычислять траекторию движения автобуса и последующими данными лишь корректировать ее;
@aMoRRoMa
aMoRRoMa / The Technical Interview Cheat Sheet.md
Last active January 24, 2019 07:24 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.