Skip to content

Instantly share code, notes, and snippets.

View FMakareev's full-sized avatar
😃

Fedor Makareev FMakareev

😃
  • alnair.ae
  • Buenos Aires
View GitHub Profile
@FMakareev
FMakareev / storageRequestCache-example.ts
Last active August 16, 2022 09:30
Simple HOC for caching request data.
const cacheConfig = {
key: 'storageRequestCache',
// 10 minutes
cacheTime: 1000 * 60 * 10,
}
const result = await storageRequestCache(cacheConfig)(() => dataHandler(api));
@FMakareev
FMakareev / gist:ec56aec2e83baba8ff11095db11becd1
Created November 9, 2021 05:27
How to find the nearest parent of a Git branch
# https://stackoverflow.com/questions/3161204/how-to-find-the-nearest-parent-of-a-git-branch\
git show-branch \
| sed "s/].*//" \
| grep "\*" \
| grep -v "$(git rev-parse --abbrev-ref HEAD)" \
| head -n1 \
| sed "s/^.*\[//"
@FMakareev
FMakareev / test.md
Last active August 16, 2018 10:52 — forked from RAM512/test.md
test challenge

Задание

Необходимо реализовать мобильное приложение, делающее запрос на простейший API и выводящее список полученных элементов. По нажатию на элемент необходимо отображать дополнительную информацию.

Требования

  • вид и формат данных определяется автором. К примеру, простейший элемент может выглядеть как { "id": "1", "title": "Hello, world", "rating": "0" }. Можно использовать генераторы данных вроде mockaroo.com
import React, {Component} from 'react';
export class TestMap extends Component {
static propTypes = {};
static defaultProps = {
locations: [
{lat: -31.563910, lng: 147.154312},
{lat: -33.718234, lng: 150.363181},
@FMakareev
FMakareev / andrey-resume.markdown
Created February 24, 2018 16:47
Andrey-resume