Skip to content

Instantly share code, notes, and snippets.

View devfreitag's full-sized avatar

Alex Freitag devfreitag

View GitHub Profile
@devfreitag
devfreitag / eslint-prettier-config.md
Last active February 9, 2023 08:43
editorconfig, eslint and prettier configuration

Add eslint

$ yarn add eslint -D

Start eslint

$ yarn add eslint --init

? How would you like to use ESLint? To check syntax, find problems, and enforce code style
? What type of modules does your project use? JavaScript modules (import/export)
? Which framework does your project use? React
? Does your project use TypeScript? Yes
? Where does your code run?
@devfreitag
devfreitag / index.js
Created November 10, 2020 23:57
Fields value Unform
import React, { useState, useEffect, useRef } from 'react';
import {
Text,
ScrollView,
PixelRatio,
Alert,
Platform,
ActivityIndicator,
} from 'react-native';
import { TouchableOpacity } from 'react-native-gesture-handler';
@devfreitag
devfreitag / filtro-api-specification-arg-resolver.md
Last active January 24, 2022 21:45
Passo a passo de como configurar/utilizar o specification-arg-resolver, biblioteca focada em filtros de API.
@devfreitag
devfreitag / import-csv-file-to-mongo.py
Created August 15, 2024 17:44
Python script to read CSV file and insert row in MongoDB
from pymongo import MongoClient
import pandas as pd
# Connect to MongoDB with username and password
username = 'USERNAME'
password = 'PASSWORD'
host = 'localhost'
port = 27017
database_name = 'DATABASE'