Skip to content

Instantly share code, notes, and snippets.

View szekelygobe's full-sized avatar
😀

szekelygobe

😀
View GitHub Profile
@szekelygobe
szekelygobe / useSlugify.js
Last active April 10, 2024 06:38
Vue.js very basic composable for slugifying text
// inspired by https://codepen.io/mrrudrud/pen/QVyZze
export function useSlugify(){
function slugify(text){
let slug = text.toLowerCase();
// Letter "e"
slug = slug.replace(/e|é|è|ẽ|ẻ|ẹ|ê|ế|ề|ễ|ể|ệ/gi, 'e');
// Letter "a"
slug = slug.replace(/a|á|à|ã|ả|ạ|ă|ắ|ằ|ẵ|ẳ|ặ|â|ấ|ầ|ẫ|ẩ|ậ/gi, 'a');
// Letter "o"
@szekelygobe
szekelygobe / localhost-ssl.md
Created February 25, 2021 15:22 — forked from ethicka/localhost-ssl.md
Local virtualhost SSL websites on Mac OS Sierra

Local virtualhost SSL websites on Mac OS Sierra

These instructions will guide you through the process of setting up a wildcard SSL for your local virtualhosts for offline development. Most importantly, this configuration will give you the happy, green lock in Chrome.

These instructions have only been tested on Mac OS Sierra using the pre-installed Apache and PHP versions. These instructions also assume you have virtualhosts set up locally already.


Configuring SSL

// source : https://stackoverflow.com/questions/1699958/formatting-a-number-with-leading-zeros-in-php
str_pad($string_to_complate, 2, '0', STR_PAD_LEFT);