Skip to content

Instantly share code, notes, and snippets.

View HandHugs's full-sized avatar

Jessie Matanky HandHugs

View GitHub Profile
@mcnamee
mcnamee / instagram-feed.php
Last active February 11, 2021 08:59
Fetch an Instagram Feed with PHP and Cache it locally
<?php
/**
* Fetches and Caches a Instagram Feed
*
* - Get an Instagram Developer Account here: https://www.instagram.com/developer/
* - Create a new client, using the 'redirect URI' as https://rudrastyh.com/tools/access-token
* - Get an access token here: https://rudrastyh.com/tools/access-token
* - This file will return JSON - so use some AJAX on the front-end to display
* - Add the instagram-feed-cache.json file as ignored, to .gitignore
*/
@dlindenkreuz
dlindenkreuz / gist:a439ec4b939f0561d6d9
Last active April 9, 2024 10:43 — forked from tyteen4a03/gist:3420a9e121d13b091343
Shopify handleize function in JavaScript
// one-liner version
// retains latin-1 supplement chars as well as latin extended-a and latin extended-b
Shopify.handleize = function (str) {
return str.toLowerCase().replace(/[^\w\u00C0-\u024f]+/g, "-").replace(/^-+|-+$/g, "");
};