Skip to content

Instantly share code, notes, and snippets.

View sadeghbarati's full-sized avatar
🍉

Sadegh Barati sadeghbarati

🍉
  • Iran, Mashhad
  • 19:12 (UTC +03:30)
View GitHub Profile
@sadeghbarati
sadeghbarati / stimulus.md
Last active February 26, 2025 04:19 — forked from mrmartineau/stimulus.md
Stimulus cheatsheet
@sadeghbarati
sadeghbarati / handleUpload.php
Created October 13, 2020 06:39 — forked from Abban/handleUpload.php
jQuery AJAX file uploads. Code for the following blog post: http://abandon.ie/notebook/simple-file-uploads-using-jquery-ajax
<?php // You need to add server side validation and better error handling here
$data = array();
if(isset($_GET['files']))
{
$error = false;
$files = array();
$uploaddir = './uploads/';
@sadeghbarati
sadeghbarati / readme.md
Created October 13, 2020 06:37 — forked from mul14/readme.md
JavaScript Upload FormData
<form id="form">
  <input type="name" name="full_name" />
  <input type="file" name="image" />
  <button type="submit">Submit</button>    
</form>
// Fetch
@sadeghbarati
sadeghbarati / guide.md
Created August 19, 2020 11:20 — forked from PJoy/guide.md
SAGE BARBA

Using barba.js with Sage starter theme

Barba.js is a library using pushState and AJAX allowing websites to load pages asynchronously while still maintaining browser states and history.

Combining it with some JavaScript animations libraries can help craft some memorable browsing experiences.

alt text source

In this guide, we will try to find an optimal way to integrate Barba with our beloved Sage theme !