Skip to content

Instantly share code, notes, and snippets.

View iagocavalcante's full-sized avatar
🖥️
Happy coding again!

Iago Angelim Costa Cavalcante iagocavalcante

🖥️
Happy coding again!
View GitHub Profile
import Login from '../components/Login'
import LoginForm from '../components/LoginForm'
import LoginFormReset from '../components/LoginFormReset'
export default [
{
path: '/login',
component: Login,
meta: {free: true},
children: [
{
import { PromisePipeFactory } from './p-pipe'
import { isFunction, isArray } from 'lodash'
const w = window
/**
* @type Function
* @param {Function}
* @returns {void}
*/
const subscribe = (() => {
@JamieMason
JamieMason / group-objects-by-property.md
Created September 14, 2018 07:38
Group Array of JavaScript Objects by Key or Property Value

Group Array of JavaScript Objects by Key or Property Value

Implementation

const groupBy = key => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = obj[key];
    objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
    return objectsByKeyValue;
@luiguild
luiguild / logger.js
Last active November 16, 2018 18:03
Simple logger module and VuePlugin that check NODE_ENV to show console.log()
const prefix = process.env.PREFIX
const nodeEnv = process.env.NODE_ENV
let logCounter = 0
let errorCounter = 0
let fatalCounter = 0
let warnCounter = 0
export const vLogger = {
install (Vue, options) {
<template>
<div>
<v-card width="100%">
<v-card-title>
<h1>{{name}}</h1>
<v-spacer></v-spacer>
<v-text-field
append-icon="search"
label="Pesquisar"
@virolea
virolea / upload.js
Last active December 12, 2024 16:14
Tracking file upload progress using axios
upload(files) {
const config = {
onUploadProgress: function(progressEvent) {
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total)
console.log(percentCompleted)
}
}
let data = new FormData()
data.append('file', files[0])
@vinicius73
vinicius73 / 0-contribua-.md
Last active October 17, 2024 19:32
Guia de referencias sobre estudo de JavaScript

Contribua

Se você quiser adicionar mais algum tópico deixe seu comentário, o objetico é facilitar para os iniciantes ou aqueles que buscam dominar JavaScript, quais tópicos são importantes para dominar JavaScript.

São tópicos para quem sabe o minimo de JavaScript (declarar variáveis), a ordem em que eles aparecem são por importância para o dominio como um todo. Mesmo que você já tenha experiência com JS, recomendo que leia os links de cada tópico para fortalecer suas bases teóricas e ter um comportamento mais profundo da linguagem.

Lista originalmente criada e compilada por Vinicius Reis

@coolvasanth
coolvasanth / ionic2_upload_file_from_google_drive
Created August 27, 2017 05:59
Uploading a file from google drive/cloud application into your server Ionic, Hybrid app development.
//You need to use html input type file for this purpose.
// INPUT TYPE FILE GIVES A WEIRD LOOK FOR APP SO I HAVE
//STYLED IT LIKE BELOW.
//the html code is as below ex home.html
<label ion-button for="uploadResume" block style="background-color: #16a085;color: white;" color="secondary">Choose Resume</label>
<input style="display: none;" type="file" name="" id="uploadResume" (change)="OnResumeSelect($event)">
@vinicius73
vinicius73 / chart.vue
Last active June 3, 2024 16:48
Vue.js + C3.js
<script>
import c3 from 'c3'
import { debounce, cloneDeep, defaultsDeep } from 'lodash'
export default {
name: 'c3-chart',
props: {
config: {
type: Object,
default: () => ({})
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 20, 2025 05:31
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example