Skip to content

Instantly share code, notes, and snippets.

View cristoferdomingues's full-sized avatar

Cristofer Domingues cristoferdomingues

  • Florianópolis, Brazil
View GitHub Profile
@cristoferdomingues
cristoferdomingues / App.vue
Last active April 24, 2018 20:18 — forked from lmiller1990/App.vue
Vuex pattern to handle ajax
<template>
<div id="app">
<p>
Pending: {{ $store.state.getInfoPending }}
</p>
<p>
{{ $store.state.getInfoData }}
</p>
</div>
</template>
@cristoferdomingues
cristoferdomingues / objectSpreed.js
Created March 5, 2018 13:45
Object spreed merged Example
getDadosDefaultApr (nmInterface, { ...extraParams }) {
this._vm.$info('getDadosDefaultApr -- http request', { params: { method: 'executar', interface: this.nmInterface, ...extraParams }})
return this.HTTP.get('defaultAprFW.rest', { params: { method: 'executar', interface: this.nmInterface, ...extraParams }})
}
@cristoferdomingues
cristoferdomingues / karma.conf.js
Created March 1, 2018 18:55 — forked from sagalbot/karma.conf.js
Karma Config for Webpack/Vue/Jasmine
module.exports = function (config) {
config.set({
browsers: ['PhantomJS'],
frameworks: ['jasmine'],
files: ['test/**/*.js'],
reporters: ['spec'],
preprocessors: {
'test/*.js': ['webpack']
},
singleRun: true,
@cristoferdomingues
cristoferdomingues / app.js
Created January 25, 2018 12:36 — forked from michelmany/app.js
Vue.js 2 Vee-validate (pt-br) CPF Validation
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VeeValidator, { Validator } from 'vee-validate'
import CpfValidator from './components/validators/cpf.validator'
import Dictionary from './components/validators/dictionary'
import Produto from './components/produtos.vue'
Validator.extend('cpf', CpfValidator)
@cristoferdomingues
cristoferdomingues / src.js
Created January 12, 2018 00:35 — forked from xVir/src.js
Get user id in FB API.AI bot
let apiaiRequest = apiAiService.textRequest(text,
{
sessionId: sessionIds.get(sender),
contexts: [
{
name: "generic",
parameters: {
facebook_user_id: sender
}
}
@cristoferdomingues
cristoferdomingues / media-queries.scss
Created September 8, 2017 18:18 — forked from chrisl8888/media-queries.scss
All Media Queries breakpoints
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ }
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ }
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ }
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ }
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ }
@media (min-width:1281px) { /* hi-res laptops and desktops */ }
@cristoferdomingues
cristoferdomingues / Menu.vue
Created August 23, 2017 17:40
Filter Menu in Vuw
<template>
<q-list>
<div class="light-paragraph sansys-menu">
<q-list-header>
<div class="menu-search">
<q-search placeholder="Buscar Módulos" v-model="menuFilter"></q-search>
</div>
</q-list-header>
<menu-item v-for="item in filteredModules" :item="item" :key="item.id || item.name" :config="menuItemConfig"></menu-item>
</div>
@cristoferdomingues
cristoferdomingues / pace.css
Created August 8, 2017 14:08
Pace Hide all but pace progress
.pace-running > :not(.pace) {
opacity: 0;
}
.pace-done > :not(.pace) {
opacity: 1;
transition: opacity .5s ease;
}
@cristoferdomingues
cristoferdomingues / httpInterceptor.js
Created July 14, 2017 16:52
Angular HttpInterceptor defaut URL prefix
'use strict';
let self;
const API_URL = 'http://localhost:8084/';
function messagesHandler(result) {
if (result.data.messages) {
result.data.messages.forEach(function(message) {
if (!message.show) {
return;
}
@cristoferdomingues
cristoferdomingues / .babelrc
Created May 23, 2017 12:22 — forked from thejmazz/.babelrc
async/await with webpack+babel
{
"presets": ["es2015"],
"plugins": ["transform-async-to-generator"]
}