Skip to content

Instantly share code, notes, and snippets.

View nlemsieh's full-sized avatar

Nabil Lemsieh nlemsieh

View GitHub Profile
emmet.require('filters').add('php', function process(tree) {
_.each(tree.children, function(node) {
// define variable name
if (node.name() == 'data' && node.parent == ''){
node.start = '\\$this->request->data';
}else{
node.start = (node.parent == '' ? '\\$' : '') + node.name();
<?php
/**
* Create a web friendly URL slug from a string.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
* @copyright Copyright 2012 Sean Murphy. All rights reserved.