Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Working with Workpay Africa in private repositories

Waiyaki maxwaiyaki

💭
Working with Workpay Africa in private repositories
View GitHub Profile
@maxwaiyaki
maxwaiyaki / amazing-string-fuctions.js
Last active Mar 27, 2020
Usefull Fuctions to create Slugs, Titles and Trim Strings
View amazing-string-fuctions.js
// Slugify a String
function slugify(string) {
const a = 'àáäâãåăæąçćčđďèéěėëêęğǵḧìíïîįłḿǹńňñòóöôœøṕŕřßşśšșťțùúüûǘůűūųẃẍÿýźžż·/_,:;'
const b = 'aaaaaaaaacccddeeeeeeegghiiiiilmnnnnooooooprrsssssttuuuuuuuuuwxyyzzz------'
const p = new RegExp(a.split('').join('|'), 'g')
return string.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters
@maxwaiyaki
maxwaiyaki / meta-tags.md
Created Oct 22, 2019 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@maxwaiyaki
maxwaiyaki / docker_wordpress_setup.md
Created Aug 19, 2019
Docker Compose File For Wordpress, MySQL & phpMyAdmin
View docker_wordpress_setup.md

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes