Skip to content

Instantly share code, notes, and snippets.

View rayets123's full-sized avatar

Vitaliy rayets123

  • Kyiv
View GitHub Profile
@rayets123
rayets123 / react-best-practices.md
Created March 30, 2023 11:05 — forked from cdiggins/react-best-practices.md
React Best Practices

Предположим, у меня есть список айтемов, где у каждого, например, есть кнопка удаления. По нажатию на кнопку просто вызывается какая-то функция, которая работает с backend API.

function ListItem({ data }) {
  return (
    <li className="list-item">
      {/* ... */}
 

Frontend Developer Tech Task

We need to create an app to review movies from The Movie Database API.

Requirements:

  • Use The Movie Database API(DOCS), we want to see your work with real data.
  • On the Homepage, we should see a list of popular movies. There should be pagination or infinite scroll.
  • When the user clicks on a movie card in the list, we go to the page where we will see detailed information about the movie.
@rayets123
rayets123 / gist:16dd8a92b5ab58658dba65ae49dd0695
Created April 25, 2019 12:08 — forked from stereokai/gist:36dc0095b9d24ce93b045e2ddc60d7a0
CSS rounded corners with gradient border
.rounded-corners-gradient-borders {
width: 300px;
height: 80px;
border: double 4px transparent;
border-radius: 80px;
background-image: linear-gradient(white, white), radial-gradient(circle at top left, #f00,#3020ff);
background-origin: border-box;
background-clip: content-box, border-box;
}
@rayets123
rayets123 / meta-tags.md
Created March 25, 2019 12:43 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@rayets123
rayets123 / multiple promises in-parallel
Last active January 21, 2019 15:03
await multiple promises in-parallel without 'fail-fast' behavior
async function bar() {
await new Promise(r=> setTimeout(r, 1000))
console.log('bar');
}
async function bam() {
await new Promise((ignore, reject)=> setTimeout(reject, 2000))
.catch(()=> { console.log('bam errored'); throw 'bam'; });
}
async function bat() {
await new Promise(r=> setTimeout(r, 3000))
sendNotification('Верните Линуса!', {
body: 'Тестирование HTML5 Notifications',
icon: 'icon.jpg',
dir: 'auto'
});
function sendNotification(title, options) {
// Проверим, поддерживает ли браузер HTML5 Notifications
if (!("Notification" in window)) {
alert('Ваш браузер не поддерживает HTML Notifications, его необходимо обновить.');
https://sarcadass.github.io/granim.js/examples.html
@rayets123
rayets123 / Fade Text
Created October 10, 2016 13:22
Fade Text on scroll
http://codepen.io/foleyatwork/pen/HAomG/
@rayets123
rayets123 / chackbox_style.css
Created February 25, 2016 10:21
style for checkbox
label
position: relative
width: 10px
height: 10px
display: block
input[type="checkbox"] + span
position: absolute
left: 1px
top: 5px
width: 11px