This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Cart | |
{ | |
public $CookieName = 'carrinho'; | |
public function __construct() { | |
if(!$this->getCookie()) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
### --- Snip --- ### | |
App::after(function($request, $response) | |
{ | |
// HTML Minification | |
if(App::Environment() != 'local') | |
{ | |
if($response instanceof Illuminate\Http\Response) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function renderPhpFile($filename, $vars = null) | |
{ | |
if (is_array($vars) && !empty($vars)) | |
{ | |
extract($vars); | |
} | |
ob_start(); | |
include $filename; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Retorna o `Date.getTime()` removendo os milisegundos. | |
time = function() | |
{ | |
return new Date().getTime().toString().substring(0,10); | |
}; | |
// Ex.: | |
setInterval(function() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Repete uma `string` a quantidade de vezes requisitada. | |
String.prototype.repeat = function( num ) | |
{ | |
return new Array( num + 1 ).join( this ); | |
} | |
// Ex.: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Esta função retorna um número randomico com o tamanho requisitado | |
// `rep` deve ser um valor inteiro e deve ser no máximo 15 | |
random = function ( rep ) | |
{ | |
if( 15 > rep ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Para saber mais siga até: http://tadeubarbosa.github.io/audio-somente-em-aba-mestre/ | |
/////// | |
// Funções simples mas que ajudam bastante neste projeto | |
// Time: Gist > https://gist.github.com/tadeubarbosa/969a249e68e3ac55f341 | |
time = function(){return new Date().getTime().toString().substring(0,10);}; | |
// Repeat : Gist > https://gist.github.com/tadeubarbosa/57ba0b9cab817afef487 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Html | |
{ | |
public static $content; | |
public static $name; | |
public static $attrs = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* ------------------------------------------- | |
* A class to compile teedcss into projects | |
* ------------------------------------------- | |
* Creator: Tadeu Barbosa | |
* Inits in: > August.03.2016 - 06:30h PM < | |
* | |
**/ |
OlderNewer