Skip to content

Instantly share code, notes, and snippets.

View gvinicius's full-sized avatar
🎯
Focusing

Vinicius Lins Gesteira gvinicius

🎯
Focusing
View GitHub Profile
@gvinicius
gvinicius / Tmux
Created January 6, 2022 17:54
Dotfiles
# use UTF8
#set -g utf8
#set-window-option -g utf8 on
# ---------------------
# General config
# ---------------------
# Reduce the escape time for ESC key to avoid delays inside neovim
@gvinicius
gvinicius / Rust
Created September 21, 2021 04:06
curl --request POST --data '{"name": "bahia", "formula": "1", "id": "1"}
' http://localhost:8000/conversion -H 'content-type: application/json'
@gvinicius
gvinicius / multiple_ssh_setting.md
Created June 24, 2019 02:20 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@gvinicius
gvinicius / StubSpec.js
Created February 11, 2019 18:55 — forked from Jeffy2012/StubSpec.js
Sinon.js Stub Demo
var expect = chai.expect;
function test() {
return arguments[0];
}
var testJSON = __html__['test/fixtures/test.json'];
var CID = 1;
function fn() {
CID++;
}
var obj = {
@gvinicius
gvinicius / remove_non_num.vim
Created December 26, 2018 18:00
Remove lines without numbers in vim
:g!/pattern/-2d
@gvinicius
gvinicius / replace.viml
Created June 25, 2018 19:17 — forked from niltonvasques/replace.viml
Replace in many files using vim
args **/**.js.erb | argdo execute '%s/<%= I18n.t \(.*\) %>/I18n.t(\1)/g' | update
:%s/\"\/assets\/\(.*\)" /"<%= asset_path "\1\" %>" /g
@gvinicius
gvinicius / example.json
Created September 25, 2017 17:51
Example of pg compare file
{
"connection1": {
"host": "10.0.0.208",
"user": "",
"password": "",
"database": "bd_grafite_demonstracao_20170809"
},
"connection2": {
"host": "10.0.0.208",
"user": "",
@gvinicius
gvinicius / omnetpp
Created February 28, 2017 00:55
Setting up omnettpp on Debian 8.2 (Jessie)
Download omnetpp for Linux on https://omnetpp.org/omnetpp
Install some of relevant libs sudo apt-get update; sudo apt-get install bison flex qt4-dev-tools tk8.6-dev
Check if you have tk library installed (install with apt if you have not it, I guess it is ), probably it is located in /usr/share... sudo ln -s /usr/bin /usr/share/tcltk/tk8.6/
cd omnetpp-5.0/ -./configure
make
Test it with: cd samples/dyna && ./dyna If the eclipse-like IDE opens, its all okay. Otherwise, a error message comes from terminal.
@gvinicius
gvinicius / database_setup.js
Created January 12, 2017 16:12 — forked from seanknox/database_setup.js
First attempt at tool to create/delete/reset DB using Sequelize and MySQL SQL dumps
'use strict';
const _ = require('lodash');
const Promise = require('bluebird');
const fs = require('fs');
const mysql = require('mysql');
const Sequelize = require('sequelize');
const config = require('config');
const database = config.get('database');