Skip to content

Instantly share code, notes, and snippets.

View carlosalbertocruz's full-sized avatar

Carlos Alberto carlosalbertocruz

View GitHub Profile
@ahgood
ahgood / jwt_decode.php
Created June 20, 2016 06:41
Get payload data from JWT token.
<?php
/**
* JSON Web Token implementation
*
* Minimum implementation used by Realtime auth, based on this spec:
* http://self-issued.info/docs/draft-jones-json-web-token-01.html.
*
* @author Neuman Vong <neuman@twilio.com>
*/
class JWT
@cagartner
cagartner / URL Amigável
Created June 28, 2013 18:44
Função para criar url amigável PHP
static function urlAmigavel($nom_tag,$slug="-") {
$string = strtolower($nom_tag);
// Código ASCII das vogais
$ascii['a'] = range(224, 230);
$ascii['e'] = range(232, 235);
$ascii['i'] = range(236, 239);
$ascii['o'] = array_merge(range(242, 246), array(240, 248));
$ascii['u'] = range(249, 252);