Skip to content

Instantly share code, notes, and snippets.

View blennocleofas's full-sized avatar

Blenno Cleofas blennocleofas

  • Paths Viagens
  • Goiânia
View GitHub Profile
@blennocleofas
blennocleofas / montar_array
Last active September 18, 2015 19:56
array_multi
private function montarArray($consulta)
{
if (count($consulta) < 1) {
return [];
}
$result = [
'cliente_nome' => $consulta[0]['NOME'],
'cliente_cpf' => $consulta[0]['CPF'],
@blennocleofas
blennocleofas / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<polymer-element name="my-element">
<?php
$fileName = $_FILES['afile']['name'];
$fileType = $_FILES['afile']['type'];
$fileContent = file_get_contents($_FILES['afile']['tmp_name']);
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent);
$json = json_encode(array(
'name' => $fileName,
'type' => $fileType,
'dataUrl' => $dataUrl,
# Delete the possibly existing autocomplete test index
curl -X DELETE localhost:9200/autocomplete_test
# Put the config of the autocomplete index
curl -X PUT localhost:9200/autocomplete_test -d '
{
"settings" : {
"index" : {
"analysis" : {
"analyzer" : {