Skip to content

Instantly share code, notes, and snippets.

View maxwaiyaki's full-sized 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 March 27, 2020 17:13
Usefull Fuctions to create Slugs, Titles and Trim Strings
// 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 October 22, 2019 08:28 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

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 August 19, 2019 19:23
Docker Compose File For Wordpress, MySQL & phpMyAdmin

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