Skip to content

Instantly share code, notes, and snippets.

View andyalmeida's full-sized avatar
:shipit:

André Almeida andyalmeida

:shipit:
View GitHub Profile
@andyalmeida
andyalmeida / .gitconfig
Last active July 24, 2020 11:23
Git configuration file
[user]
email = andalvalmeida@gmail.com
name = André Almeida
[core]
editor = vim
~/.gitignore_global
[push]
default = current
@andyalmeida
andyalmeida / posicionamento-css.md
Created December 28, 2019 18:35
Resumo das principais propriedades de posicionamento CSS.
@andyalmeida
andyalmeida / redux.js
Created November 17, 2019 19:28
Redux configuration file
import { createStore } from 'redux';
import rootReducer from './modules/rootReducer';
const enhancer =
process.env.NODE_ENV === 'development' ? console.tron.createEnhancer() : null;
const store = createStore(rootReducer, enhancer);
export default store;
@andyalmeida
andyalmeida / ReactotronConfig.js
Last active November 16, 2019 17:00
Reactotrons Configurations
// ReactJS with Redux
import Reactotron from 'reactotron-react-js';
import { reactotronRedux } from 'reactotron-redux';
if (process.env.NODE_ENV === 'development') {
const tron = Reactotron.configure()
.use(reactotronRedux())
.connect();
tron.clear();
@andyalmeida
andyalmeida / .editorconfig
Last active November 3, 2019 03:35
New React project ESLint Configuration
root = true
[*]
end_of_line = lf
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@andyalmeida
andyalmeida / babel.config.js
Last active November 3, 2019 03:38
New React Project without react-cli configuration
module.exports = {
presets: [
'@babel/preset-env',
'@babel/preset-react'
],
plugins: [
'@babel/plugin-proposal-class-properties'
]
}
@andyalmeida
andyalmeida / leitor.js
Last active November 18, 2022 22:42
Load .pdf files with pdf.js
var leitor = {};
leitor.PageNum = 1;
var pdfDoc = null;
var pageRendering = false;
var pageNumPending = null;
var scale = 0.8;
// Prepare canvas using PDF page dimensions
var canvas = null;
var context = null;
@andyalmeida
andyalmeida / .sequelizerc
Created October 19, 2019 13:07
Sequelize paths configuration
const { resolve } = require('path');
module.exports = {
config: resolve( __dirname, 'src', 'config', 'database.js'),
'models-path': resolve( __dirname, 'src', 'app', 'models'),
'migrations-path': resolve( __dirname, 'src', 'database', 'migrations'),
'seeders-path': resolve( __dirname, 'src', 'database', 'seeds'),
};
@andyalmeida
andyalmeida / nodemon.json
Created October 19, 2019 12:24
Noremon configuration
{
"execMap": {
"js": "node -r sucrase/register"
}
}
@andyalmeida
andyalmeida / launch.json
Created October 16, 2019 23:57
VSCode debuger with sucrase Configuration
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Launch Program",