Skip to content

Instantly share code, notes, and snippets.

View rhuffstedtler's full-sized avatar

Robert Huffstedtler rhuffstedtler

View GitHub Profile
@tylers-username
tylers-username / .lando.yml
Last active September 1, 2020 08:34
Magento 2: Quick Lando Setup
#####
# Built & Tested against: v3.0.0-rc.16
#
# The first time that this project is launched, it will take Lando a while to get past "waiting until nginx service is ready"
# This is because Magento has not yet been setup and is 302-redirecting "/" to "/setup" while Lando is hoping for a "200"
# response. One the setup has completed Lando will show a ready-state much more quickly on the next start-up.
# Give this Lando project a unique name
name: m2-community
@codeguy
codeguy / slugify.js
Created September 24, 2013 13:19
Create slug from string in Javascript
function string_to_slug (str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}