Skip to content

Instantly share code, notes, and snippets.

@agkovalev
agkovalev / slugify.php
Created March 10, 2016 09:00 — forked from taufik-nurrohman/slugify.php
Slug URL Generator
<?php
function do_slug($text, $lower = true, $strip_underscores_and_dots = true, $connector = '-') {
$text_accents = array(
// Numeric characters
'¹' => 1,
'²' => 2,
'³' => 3,
// Latin
'°' => 0,
@agkovalev
agkovalev / php-html-css-js-minifier.php
Created March 10, 2016 08:52 — forked from taufik-nurrohman/php-html-css-js-minifier.php
PHP Function to Minify HTML, CSS and JavaScript
<?php
/**
* -----------------------------------------------------------------------------------------
* Based on `https://github.com/mecha-cms/mecha-cms/blob/master/system/kernel/converter.php`
* -----------------------------------------------------------------------------------------
*/
// HTML Minifier
function minify_html($input) {
@agkovalev
agkovalev / 0_reuse_code.js
Created July 6, 2014 12:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console