Skip to content

Instantly share code, notes, and snippets.

View rogeriomq's full-sized avatar
💭
Work with full JS

Rogério M. de Queiroz rogeriomq

💭
Work with full JS
View GitHub Profile
/**
* By Rogério M. de Queiroz(rogerio.mq@gmail.com)
* https://github.com/rogeriomq
* Funções de filtros diversos.
* Código inspirado nos .js de igorcosta/ng-filters-br:
* https://github.com/igorcosta/ng-filters-br/tree/master/src/brasil/filters
*/
const cpfFormatter = (input) => {
let str = input + ''
<template>
<field :class="classNames"
v-bind="{dependsIsOk, id, inline, problem, problems, label, validate, title, tooltip, editable}">
<div slot="component">
<div v-show="editable" :class="['component', problems.length ? 'has-error' : '']">
<i class="material-icons" @click="openWidget">&#xE878;</i>
<q-datetime ref="widget" v-model="widget"
type="date" ok-label="Ok" cancel-label="Cancelar" clear-label="Limpar"></q-datetime>
<input :id="id" ref="input" :type="type" :name="name" class="input full-width" :placeholder="placeholder"
@rogeriomq
rogeriomq / Sample.vue
Last active April 20, 2018 18:03
DynamicSanitizeData Vuejs - Crie métodos e/ou dados de form para "limpar" dados de formulário
<template>
<div>
<!-- SEUS INPUTS, COM V-MASK, ETC... -->
</div>
</template>
import dynamicSanitizeToAPI from '@/mixins/dynamicSanitizeToAPI'
import { onlyDigits } from 'utils/sanitize'
const formSanitizeToAPI = dynamicSanitizeToAPI({
form: {
id: {default: null},
// Add quasar-framework tags components.
{
"known_html_tags": "html head title base link meta style script noscript body section nav article aside h1 h2 h3 h4 h5 h6 hgroup header footer address p hr pre blockquote ol ul li dl dt dd figure figcaption div a em strong small s cite q dfn abbr data time code var samp kbd sub sup i b u mark ruby rt rp bdi bdo span br wbr ins del img iframe embed object param video audio source track canvas map area svg math table caption colgroup col tbody thead tfoot tr td th form fieldset legend label input button select datalist optgroup option textarea keygen output progress meter details summary command menu main template q-layout q-page-container q-page q-layout-header q-layout-footer q-layout-drawer q-page-sticky q-fab q-fab-action q-resize-observable q-window-resize-observable q-btn q-btn-group q-btn-dropdown q-toolbar q-toolbar-title q-tabs q-tab q-tab-pane q-route-tab q-pull-to-refresh q-context-menu q-breadcrumbs q-breadcrumbs-el q-pagination q-field q-input q-chips-in
export default (enable = false) => {
function formatTime (timeInMs) {
let date = new Date(timeInMs)
// ${date.getDate()}/${date.getMonth()}/${date.getFullYear()}
return `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}.${date.getMilliseconds()}`
}
function log (type, ...args) {
if (enable) {
console[type](`%c[${this.$_id}]${formatTime(Date.now())}>> `,
@rogeriomq
rogeriomq / settings.json
Created July 24, 2019 19:14
My configs VSCODE
{
"window.zoomLevel": 2,
"window.menuBarVisibility": "visible",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"workbench.colorTheme": "Dracula",
"workbench.activityBar.visible": true,
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
@rogeriomq
rogeriomq / api.js
Created July 31, 2019 19:02 — forked from diego3g/api.js
export function loadLists() {
return [
{
title: 'Tarefas',
creatable: true,
cards: [
{
id: 1,
content: 'Estudar módulo 01 de NodeJS',
labels: ['#7159c1'],