Skip to content

Instantly share code, notes, and snippets.

View yugako's full-sized avatar
🎯
Focusing

Yurii Hasiuk yugako

🎯
Focusing
View GitHub Profile
{
"__inputs": [
{
"name": "DS_COGNITE_DATA FUSION",
"label": "Cognite Data Fusion",
"description": "",
"type": "datasource",
"pluginId": "cognitedata-datasource",
"pluginName": "Cognite Data Fusion"
}
@yugako
yugako / Example.tsx
Created April 27, 2021 20:06 — forked from stolinski/Example.tsx
Route Transitions with Framer Motion
const FakeComponent = () => {
return (
<AnimatedRoutes exitBeforeEnter initial={false}>
<RouteTransition exact path="/some-route">
<NewUsers />
</RouteTransition>
<RouteTransition exact path="/yo" >
<Users />
</RouteTransition>
</AnimatedRoutes>
@yugako
yugako / tasks_js.js
Last active January 7, 2023 13:13
Interview tasks - Pure js
const c = sentenceCreator();
c.add('Hello');
c.add('World!');
c.get(); // Hello World!
function senteseCreator() {
}
@yugako
yugako / Welcome file.md
Created March 6, 2021 18:02
Welcome file

Welcome to StackEdit!

Hi! I'm your first Markdown file in StackEdit. If you want to learn about StackEdit, you can read me. If you want to play with Markdown, you can edit me. Once you have finished with me, you can create new files by opening the file explorer on the left corner of the navigation bar.

Files

StackEdit stores your files in your browser, which means all your files are automatically saved locally and are accessible offline!

Create files and folders

@yugako
yugako / yurii_hasiuk_hometask.js
Last active January 21, 2021 16:05
Calculates string
/**
* BRIEF EXPLANATION
* The main idea is starting with the operator with lowest priority and go up in ascending order of priority.
* The first step is excluding all spaces and symbols around each number (at the start and at the end)
* I split strings according to the binding with the operator I am looking.
* Each step will call function for simplified expression obtained containing one less operator.
* At the last step, I accumulate the result using proper accumulator function and initial value.
*/
// Handle *
@yugako
yugako / gist:1bf98cfb768030525f93570546353d66
Created September 1, 2020 15:52 — forked from oswaldoacauan/gist:7580474
jQuery - Serialize Form with File inputs
(function($) {
$.fn.serializeFiles = function() {
var form = $(this),
formData = new FormData()
formParams = form.serializeArray();
$.each(form.find('input[type="file"]'), function(i, tag) {
$.each($(tag)[0].files, function(i, file) {
formData.append(tag.name, file);
});
@yugako
yugako / # Sublime Emmet JSX Reactjs.md
Created February 19, 2020 06:19 — forked from max-mykhailenko/# Sublime Emmet JSX Reactjs.md
Sublime text 3. Enable Emmet in JSX files with Sublime React plugin

This is no longer needed as Emmet supports JSX - you just need to turn it all on. Did a quick tutorial: http://wesbos.com/emmet-react-jsx-sublime/

Thanks, @wesbos

Problem

  • Using emmet in jsx files
  • Emmet expands text when js autocomplete needed
<div class="progress">
<div class="progress-container">
<div class="progress-bar" id="bar"></div>
</div>
</div>
<div>content...</div>
@yugako
yugako / apache-nginx-ftp
Created June 30, 2019 19:05 — forked from solancer/apache-nginx-ftp
Correct permissions for /var/www/html
// Adding current user to www-data
sudo adduser $USER www-data
//change ownership to user:www-data and
sudo chown $USER:www-data -R /var/www/html
sudo chmod u=rwX,g=srX,o=rX -R /var/www/html
// change file permissions of existing files and folders to 755/644
sudo find /var/www/html -type d -exec chmod g=rwxs "{}" \;
@yugako
yugako / index.html
Created June 5, 2018 10:51
In this Gist you can see how create vertical dropdown menu.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dropdown Menu</title>
<link rel="stylesheet" href="style.css">
</head>
<body>