Skip to content

Instantly share code, notes, and snippets.

View bielb2's full-sized avatar
🎯
Focusing

Gabriel bielb2

🎯
Focusing
  • Brazil
View GitHub Profile
@bielb2
bielb2 / .zshrc
Last active April 18, 2023 21:38
# How to use
# gedit ~/.zshrc or ~/.bashrc and paste the aliases
### ALIASES
# GENERAL
alias c="clear"
# END OF GENERAL
@bielb2
bielb2 / usingMoment.js
Last active February 4, 2021 21:04
moment lib to handle with hours
// https://momentjs.com/
import * as moment from 'moment';
import 'moment/locale/pt-br';
// -------------------- FIRST
const getDate = new Date((parseInt(timeStampHour)))
moment.locale('pt-br');
@bielb2
bielb2 / geocoding.js
Last active February 3, 2021 16:11
Get lat and lng from google maps
import axios from 'axios';
const formatedAddress = enderecoCompleto.split(' ').join('+');
const response = await axios.get(`https://maps.googleapis.com/maps/api/geocode/json?address=${formatedAddress}&key=${process.env.REACT_APP_GOOGLEMAPS_TOKEN}`);
const latitude = response.data.results[0].geometry.location.lat;
const longitude = response.data.results[0].geometry.location.lng;
{
"parser": "babel-eslint",
"env": {
"browser": true,
"jest": true
},
"plugins": ["react", "jsx-a11y", "import"],
"extends": "airbnb",
"rules": {
"react/jsx-filename-extension": [