Skip to content

Instantly share code, notes, and snippets.

View fabioebner's full-sized avatar

Fabio Ebner fabioebner

View GitHub Profile
<template>
<div class="flex justify-center items-center h-screen flex-col">
id: {{ $route.params.id }}
<!-- Configuracoes {{ configuracoes }} -->
aqui: {{ data }}
</div>
</template>
<script setup>
import { useTokenStore } from "~/store/token";
<template>
<div>
....
</div>
</template>
<script setup>
const props = defineProps(["titulo", "itens"]);
const emit = defineEmits(["update:itens"]);
const categoria = ref("");
const categorias = reactive([]);
@fabioebner
fabioebner / mural.vue
Created February 16, 2021 22:29
Nuxt
<template>
<v-container fluid>
<v-btn @click="proximo">va</v-btn>
<v-row>
<v-col
v-for="sessao in sessoes"
:key="sessao.id"
xs="12"
sm="12"
md="6"
CREATE OR REPLACE FUNCTION atualiza_folha_termo() RETURNS TRIGGER AS $BODY$
DECLARE
ultima_folha_termo_var integer;
proxima_folha_var integer;
ultimo_termo db_firma.tb_etiqueta%rowtype;
rand_var bigint;
BEGIN
IF EXISTS (SELECT * FROM db_firma.tb_configuracao_firma) THEN
SELECT INTO ultima_folha_termo_var ultima_folha_termo FROM db_firma.tb_configuracao_firma;
IF (NEW.nm_adquirente IS NOT NULL) THEN
@fabioebner
fabioebner / load-vue-components-from-folder.js
Created August 12, 2019 17:39 — forked from eirikb/load-vue-components-from-folder.js
Load all Vue components from a given folder, no need for an "index.js"-file
const req = require.context('./components/', true, /\.(js|vue)$/i);
req.keys().map(key => {
const name = key.match(/\w+/)[0];
return Vue.component(name, req(key))
});
@fabioebner
fabioebner / gist:c9ad6415b67ca40d16dca87637c24bac
Created June 28, 2019 20:19
Build maven com propriedade no application.yml
Adicione essa entrada no pom.xml:
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
</dependency>
Dentro do contexto do build do seu pom.xml, configure o plugin com a seguinte entrada:
<template>
<v-card>
<v-card-title v-if="titulo">
{{titulo}}
</v-card-title>
<v-container fluid grid-list-md>
<v-layout row wrap>
<v-flex xs2 md2>
<v-text-field
label="Cep"
@Query(value = "SELECT cast(data as timestamp with time zone) as data, coalesce(sum(t.vl_total_movimentacao),0) as movimentacao, coalesce(sum(t.vl_desconto),0) as descontos FROM generate_series(cast (?1 as timestamp), cast (?2 as timestamp), '1 day') as dia(data) left join db_caixa.tb_movimentacao t on t.dt_movimentacao = data and t.cd_caixa in (?3) group by data order by data", nativeQuery = true)
List<Object[]> chartGeral(Date dtInicial, Date dtFinal, Integer[] cdCaixa);
//This gist have this return
//2016-01-01 | 2323.33 | 332.22
//2016-01-03 | 2323.33 | 332.22
//2016-01-04 | 2323.33 | 332.22
//2016-01-05 | 2323.33 | 332.22
//...