Skip to content

Instantly share code, notes, and snippets.

View giokaxo's full-sized avatar
👨‍🚀

Giorgi Kakhoshvili giokaxo

👨‍🚀
View GitHub Profile
@giokaxo
giokaxo / slugify.js
Last active September 23, 2019 11:00 — forked from hagemann/slugify.js
Slugify makes a string URI-friendly
function slugify(string) {
const a = 'აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰ·/_,:;'
const b = 'abgdevztiklmnopjrstufqgkscczwwxjh------'
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
.replace(/&/g, '-and-') // Replace & with 'and'
.replace(/[^\w\-]+/g, '') // Remove all non-word characters
@giokaxo
giokaxo / php-code-inspection.md
Created April 20, 2017 17:51
How to install PHP code inspection tools using homebrew-php and how to integrate with JetBrain's IntelliJ or PhpStorm

#Inspection Tools with homebrew-php#

##Prerequisites##

  • Homebrew is installed

##Step 1: Installing homebrew-php##

  1. brew tap homebrew/dupes
  2. brew tap josegonzalez/homebrew-php
  3. brew install PHP53 (or other version of your choice)