Skip to content

Instantly share code, notes, and snippets.

Evgeny Rodionov evgenyrodionov

Block or report user

Report or block evgenyrodionov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@evgenyrodionov
evgenyrodionov / frontend.md
Last active Mar 30, 2020
Тестовое задание на фронтэнд-разработчика
View frontend.md

Задача

Нужно написать апп, который рендерит список объектов карточками.

Детали

  • Пагинация нужна
  • Выводить сообщение «Нет объектов», если API не возвращает объекты.
  • Выводить прелоадер, когда идёт запрос.
  • React, Redux
@evgenyrodionov
evgenyrodionov / index.html
Last active Mar 22, 2020
Minimally working version of SSR (react, react-router, react-helmet, styled-components; implying use of react-scripts without eject)
View index.html
<!doctype html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="$helmet-placeholder$">
<meta name="$sc-placeholder$">
<style>
View Remark API.md

Users

  • /users
    • GET — получить список пользователей
    • POST — новый пользователь
    • /{id}
      • GET — информация по пользователю
      • POST — обновить данные пользователя
      • DELETE — удалить пользователя

Apps

@evgenyrodionov
evgenyrodionov / gist:edfe9dea12196056467f
Last active Jan 16, 2020
Clean up all cached pages in prerender.io from console
View gist:edfe9dea12196056467f
var cleanUp = function() {
$.ajax({method: "GET", url: "https://prerender.io/api/cached-pages?page=0&pageSize=1000000"}).success(function(response) {
var total = response,
lastChecked = 1;
console.log("total: " + response.length);
for(var i = 0; i < total.length; i++) {
$.ajax({
method: "DELETE",
@evgenyrodionov
evgenyrodionov / .gitconfig
Created May 11, 2017
aliases for .gitconfig
View .gitconfig
[alias]
co = checkout
c = commit
st = status
br = branch
pl = pull
p = push
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
View gist:da27f931d8dec5078e8d

Sync with Dropbox

Initial setup
mkdir Dropbox/Sublime\ Text\ 2

cp -r ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages ~/Dropbox/Sublime\ Text\ 2
cp -r ~/Library/Application\ Support/Sublime\ Text\ 2/Packages ~/Dropbox/Sublime\ Text\ 2
cp -r ~/Library/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages ~/Dropbox/Sublime\ Text\ 2

ln -s ~/Dropbox/Sublime\ Text\ 2/Installed\ Packages ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages
ln -s ~/Dropbox/Sublime\ Text\ 2/Packages ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
View responsive-grid.css
.row {
box-sizing: border-box;
display: flex;
margin-right: -15px;
margin-left: -15px;
}
[class*="col-xs-"] {
box-sizing: border-box;
padding-right: 15px;
View gist:3837920
hr {
border: 0;
height: 1px;
background-image: linear-gradient(left , rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
background-image: -o-linear-gradient(left , rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
background-image: -moz-linear-gradient(left , rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
background-image: -webkit-linear-gradient(left , rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
background-image: -ms-linear-gradient(left , rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
background-image: -webkit-gradient(
View fetch-api.js
import { JSONToQueryParams } from '@dtrussia/utils.js';
const basicUrl = '/api/v1';
function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
return response;
}
const { status, body } = response;
You can’t perform that action at this time.