Skip to content

Instantly share code, notes, and snippets.

View carvalhoviniciusluiz's full-sized avatar
🏠
Working from home

Vinicius Carvalho carvalhoviniciusluiz

🏠
Working from home
View GitHub Profile
" Must come first because it changes other options
set nocompatible
" [vim-plug] Load plugins
call plug#begin()
Plug 'dracula/vim', { 'as': 'dracula' }
Plug 'junegunn/vim-easy-align'
Plug 'pangloss/vim-javascript' " JavaScript support
Plug 'leafgarland/typescript-vim' " TypeScript syntax
Plug 'maxmellon/vim-jsx-pretty' " JS and JSX syntax
@carvalhoviniciusluiz
carvalhoviniciusluiz / settings.json
Created June 23, 2020 20:45
My VSCode configuration
{
// define o tema do vscode
"workbench.colorTheme": "Dracula",
// aumenta a fonte do terminal
"terminal.integrated.fontSize": 16,
// define o tema de icones na sidebar
"workbench.iconTheme": "material-icon-theme",
@carvalhoviniciusluiz
carvalhoviniciusluiz / FilasController.js
Last active February 19, 2020 14:44
Send sync queue
const amqp = require('amqplib');
const uuid = require('uuid');
module.exports = {
async sendPublish (req, res) {
const url = ``;
const exchange = '';
const routing_key = '';
const conn = await amqp.connect(url);
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/viniciuscarvalho/.oh-my-zsh"
export PATH="$PATH:/usr/local/bin"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
@carvalhoviniciusluiz
carvalhoviniciusluiz / settings.json
Created June 20, 2019 02:56
Settings preferences for vscode
{
// inicia com uma nova página aberta
"workbench.startupEditor": "newUntitledFile",
// define o tema padrão do VSCode
// "workbench.colorTheme": "Dracula",
// define o tema de icones na sidebar
// "workbench.iconTheme": "material-icon-theme",
// formata e salva o texto
"window.zoomLevel": 1,
// salva o arquivo assim que perde o foco
<template>
<v-form ref="form" v-model="valid" lazy-validation>
<v-flex xs12>
<v-text-field
:rules="[rules.required]"
label="Firstname"
v-model="firstname"
@update:error='doSomething'
required
></v-text-field>
@carvalhoviniciusluiz
carvalhoviniciusluiz / template.html
Created August 2, 2017 10:47
Exemplo template .vue
<template lang="html">
<!-- Date -->
<div class="component date" @dblclick="modalShow">
<div :class="klass">
<label :class="metadata.labelClass" :for="name">
{{metadata.label}}
</label>
<div class="form-group date" v-if="metadata.type === 'text'">
<input type="text"
:class="metadata.cssClass"
@carvalhoviniciusluiz
carvalhoviniciusluiz / webpack.config.js
Created December 5, 2016 11:20
Require.js to Webpack
var webpack = require('webpack');
module.exports = {
entry: [ "app/app" ]
, output: {
path: __dirname + "/build"
, filename: "bundle.js"
, publicPath: "/build/"
}
, resolve: {
@carvalhoviniciusluiz
carvalhoviniciusluiz / inflector-pt-BR.js
Created October 14, 2016 20:41
alter rules of the Ember.Inflector for pt-BR
import Inflector from 'ember-inflector';
Ember.Inflector.inflector.rules = {
plurals: [
[/$/, 's'],
[/(s)$/i, 's'],
[/^(paí)s$/i, 'ses'],
[/(z|r)$/i, 'es'],
[/al$/i, 'ais'],
[/el$/i, 'eis'],
@carvalhoviniciusluiz
carvalhoviniciusluiz / watchr.rb
Last active September 6, 2016 12:45
Correction of the Config::CONFIG in watcher
# first install the gem
gem install watchr
# then find the gem watchr
locate watchr
# open the file watchr.rb
subl ~/.rvm/gems/ruby-2.3.1/gems/watchr-0.7/lib/watchr.rb
# rewrite the line