Skip to content

Instantly share code, notes, and snippets.

View yurii-hasiuk's full-sized avatar
🎯
Focusing

Yurii Hasiuk yurii-hasiuk

🎯
Focusing
View GitHub Profile
@yurii-hasiuk
yurii-hasiuk / 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>
@yurii-hasiuk
yurii-hasiuk / 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);
});
@yurii-hasiuk
yurii-hasiuk / # 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
@yurii-hasiuk
yurii-hasiuk / 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 "{}" \;