Skip to content

Instantly share code, notes, and snippets.

@aluissp
aluissp / Dockerfile
Last active March 5, 2023 00:19
Simple config to Dockerfile and docker-compose.yml
FROM node:18
RUN mkdir -p /home/app
COPY . /home/app
EXPOSE 3000
CMD ["node", "/home/app/index.js" ]
@aluissp
aluissp / to.js
Created February 26, 2023 13:25
utility 'to' function to work with promises
const to = (promise) => {
return promise
.then((data) => {
return [null, data];
})
.catch((err) => [err, null]);
};
exports.to = to;
@aluissp
aluissp / tailwind.config.js
Created February 12, 2023 20:45
Fade in animation in Tailwind CSS
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
animation: {
fade: 'fadeIn .5s ease-in-out',
},
@aluissp
aluissp / .eslintrc.js
Created February 3, 2023 02:11
Eslint setup for reactjs
module.exports = {
env: {
browser: true,
es2021: true,
},
settings: {
react: {
version: 'detect',
},
},