Skip to content

Instantly share code, notes, and snippets.

View alexandreramosdev's full-sized avatar
:shipit:
Working...

Alexandre Ramos alexandreramosdev

:shipit:
Working...
View GitHub Profile
@alexandreramosdev
alexandreramosdev / .zshrc
Created June 4, 2020 21:29 — forked from ThYpHo0n/.zshrc
WSL(2) bash profile helpers
# Windows XSrv config
export $(dbus-launch)
export LIBGL_ALWAYS_INDIRECT=1
export WSL_VERSION=$(wsl.exe -l -v | grep -a '[*]' | sed 's/[^0-9]*//g')
export WSL_HOST=$(tail -1 /etc/resolv.conf | cut -d' ' -f2)
export DISPLAY=$WSL_HOST:0
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
module.exports = {
env: {
es6: true,
jest: true,
browser: true
},
extends: ["airbnb", "prettier", "prettier/react"],
globals: {
Atomics: "readonly",
SharedArrayBuffer: "readonly",
@alexandreramosdev
alexandreramosdev / gatsby-node.js
Created February 2, 2020 04:43
Config Debug Gatsby Vscode
exports.onCreateWebpackConfig = ({ actions }) => {
actions.setWebpackConfig({
devtool: 'eval-source-map',
})
}
@alexandreramosdev
alexandreramosdev / token-generator.js
Created November 7, 2019 02:52 — forked from ziluvatar/token-generator.js
Example of refreshing tokens with jwt
/**
* Example to refresh tokens using https://github.com/auth0/node-jsonwebtoken
* It was requested to be introduced at as part of the jsonwebtoken library,
* since we feel it does not add too much value but it will add code to mantain
* we won't include it.
*
* I create this gist just to help those who want to auto-refresh JWTs.
*/
const jwt = require('jsonwebtoken');
@alexandreramosdev
alexandreramosdev / api.md
Created November 3, 2019 03:09
api cartolafc
@alexandreramosdev
alexandreramosdev / expose.sh
Last active October 23, 2019 04:10
Expose local servers to the internet
ssh -R alexandre:80:localhost:80 serveo.net
# saida http://alexandre.serveo.net
#fonte http://serveo.net/
@alexandreramosdev
alexandreramosdev / user.test.js
Last active October 23, 2019 03:15
test bcrypt
const bcrypt = require('bcryptjs')
const User = require('../../app/models/user.model')
describe('User', () => {
beforeEach(async () => {
await User.deleteMany({})
})
it('should encrypt user password', async (done) => {
@alexandreramosdev
alexandreramosdev / .vimrc
Created July 19, 2019 17:09 — forked from Tset-Noitamotua/.vimrc
Powerline Setup for my VIM
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
" "
" __ _ _ _ __ ___ _ __ ___ "
" \ \ / / | '_ ` _ \| '__/ __| "
" \ V /| | | | | | | | | (__ "
" \_/ |_|_| |_| |_|_| \___| "
" "
" "
"++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
@alexandreramosdev
alexandreramosdev / dockerPostgres.sh
Created June 27, 2019 23:52
Docker script Postgres
docker run \
--name postgres \
-e POSTGRES_USER=alexandreramos \
-e POSTGRES_PASSWORD=minhasenhasecreta \
-e POSTGRES_DB=heroes \
-p 5432:5432 \
-d \
postgres
docker run \