Skip to content

Instantly share code, notes, and snippets.

View dbismut's full-sized avatar
🏠
Working from home

David Bismut dbismut

🏠
Working from home
View GitHub Profile
@ayamflow
ayamflow / astro-spa-transitions-framework.md
Last active April 21, 2025 08:16
Building an Astro site with SPA-like page transitions & component framework

Building an Astro site with SPA-like page transitions & component framework

Swup & swup/astro come with most fixes for the typical problems but if you're using something else I'll resume the fixes here as I just went through this rabbit hole.

Steps

1. Pick a pjax routing library

Barba, swup, highway, taxi, etc

2. Update the <head>

If your pjax lib doesn't do it, you'll need to update the `` after every route to import correct styles & scripts.

@jhgaylor
jhgaylor / meteor_download.js
Last active January 18, 2018 10:31
Download files to the filesystem on the meteor server
//given the urls of files to download, store them on the filesystem
function download_all_files (urls, base_destination, job_id, cb) {
var url = urls.shift();
var file_path = path.join(base_destination, job_id);
// the path to the file without the filename
var path_to_file_folder = path.dirname(file_path);
// the method to store a downloaded file to the fs
// makes an http request and writes the response to a file