nano file.po
Compilando
msgfmt -cv -o file.mo file.po
<?php | |
$pessoa = array( | |
"nome" => "Pessoa 1", | |
"sobrenome" => "da Silva" | |
); | |
echo json_encode($pessoa); // Vai gerar {"nome":"Pessoa 1", "sobrenome":"da Silva"} | |
// Se vc quiser um array de pessoas ... |
<?php | |
function redirect_back_or_default($url = null){ | |
try{ | |
return Redirect::back(); | |
}catch(Exception $e){ | |
return Redirect::to($url); | |
} | |
} |
<% | |
tipo_ocor = { | |
:association => f.object.class.reflect_on_association(:tipo_ocorrencia), | |
:options => {:include_blank => true}, | |
:html_options => { | |
:onchange => remote_function(:url => { | |
:controller => "advocacia/processos", | |
:action => "campos_tipo_ocorrencia", | |
:index => index | |
}, |
[client] | |
... | |
max_allowed_packet=64M | |
[mysqld] | |
... | |
key_buffer=16M | |
max_allowed_packet=64M | |
sort_buffer_size=512K | |
net_buffer_length=8K |
/* | |
Permite truncar o texto das celulas e fixar a largura da tabela | |
*/ | |
.table-truncated { | |
table-layout: fixed; | |
} | |
.table-truncated td{ | |
white-space: nowrap; |
Please, use the package https://github.com/vluzrmos/lumen-cors.
<?php | |
if (!function_exists('faker')) { | |
/** | |
* Generate or get a faker localized instance | |
* @param locale $l | |
* @example | |
* <code> |
#!/usr/bin/env php | |
<?php | |
/** @var string local dir */ | |
$cwd = getcwd(); | |
/** @var array local dir subdirectories */ | |
$dirs = glob($cwd."/*", GLOB_ONLYDIR); | |
/** @var array local dir subtitles */ |