Skip to content

Instantly share code, notes, and snippets.

View movibe's full-sized avatar
🎮
Programming

Willian Ribeiro Angelo movibe

🎮
Programming
  • Agencia Foccus
  • São Paulo - Brasil
  • X @m0vibe
View GitHub Profile
import { StatusBar } from "expo-status-bar";
import React, { useState } from "react";
import {
FlatList,
View,
Text,
Image,
StyleSheet,
SafeAreaView,
useWindowDimensions,
@movibe
movibe / react-state-management.md
Created May 28, 2022 21:18 — forked from xeoncross/react-state-management.md
Comparison of react state management + Dev story + Testing for Redux Toolkit, Zustand, Jotia, and Valtio

A demo "counter" + async application (codesandbox) is provided for each of the following four state libraries. The Zustand codesandbox includes three versions: vanila, immer, and redux-like

Redux Toolkit

OpenAPI

RTK Query has a (currently experimental) code-gen tool that will take an OpenAPI spec or GraphQL schema and give you a typed API client, as well as provide methods for enhancing the generated client after the fact.

@movibe
movibe / docker-postgres.md
Created May 28, 2022 16:21 — forked from przbadu/docker-postgres.md
docker-postgresql-setup

Create docker-compose.yml file

version: "3"
services:
  db:
    image: "postgres"
    container_name: "my_postgres"
    ports:
 - "54320:5432"
@movibe
movibe / RNRollup.config.js
Created November 23, 2021 04:26 — forked from pritishvaidya/RNRollup.config.js
Sample Rollup Config for react-native
/* eslint-disable flowtype/require-valid-file-annotation, no-console, import/extensions */
import nodeResolve from 'rollup-plugin-node-resolve';
import replace from 'rollup-plugin-replace';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import json from 'rollup-plugin-json';
import { terser } from 'rollup-plugin-terser';
import sourceMaps from 'rollup-plugin-sourcemaps';
import pkg from './package.json';
@movibe
movibe / useSWRAxios.ts
Created April 16, 2021 13:02
useSWRAxios
import axios, { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios'
import useSWR, { ConfigInterface } from 'swr'
export const useSWRAxios = <Data extends {}>(
request: Omit<AxiosRequestConfig, 'baseURL' | 'method' | 'data'>,
config?: ConfigInterface,
) => {
const requestModified: AxiosRequestConfig = {
...request,
method: `GET`,
@movibe
movibe / docker-compose.yml
Created February 1, 2021 18:15
Docker compose hasura next
version: '3.6'
services:
postgres:
image: mdillon/postgis
env_file: ./backend/.env
ports:
- '5432:5432'
restart: always
volumes:
- db_data:/var/lib/postgresql/data
@movibe
movibe / setup.md
Created August 20, 2020 12:07 — forked from shirakaba/setup.md
Configuring Nexus as a private registry for npm packages

Get the details to connect to your Nexus-managed npm repository

Note: Nexus group repositories (good example in this StackOverflow question) are out of this tutorial's scope. In any case, deployment to group repositories is currently still an open issue for Nexus 3 (and not intended ever to be implemented in Nexus 2). Thus, it is assumed that we'll push & pull to/from the same repository, and ignore the idea of groups hereon in.

  1. Ask your sysadmin for a username & password allowing you to log into your organistation's Nexus Repository Manager.

  2. Test the login credentials on the Nexus Repository manager at: http://localhost:8081/nexus/#view-repositories (localhost in our case is replaced by a static IP, and can only be connected to over VPN). If your organisation requires a VPN to connect to it, connect to that VPN before proceeding with this tutori

const formatValue = (value: number): string =>
Intl.NumberFormat('pt-BR',{
style: 'currency',
currency: 'BRL',
}).format(value);
@movibe
movibe / mac_setup.sh
Last active January 19, 2021 11:09 — forked from jjvillavicencio/setup.sh
Mac setup
#/bin/bash
# Essenentials
cd ~
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install -y unzip lib32z1 openjdk-8-jdk gradle zsh powerline fonts-powerline build-essential
# NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
@movibe
movibe / ubuntu-movibe.sh
Last active April 25, 2020 19:43
ubuntu-movibe.sh
#!/bin/bash
## Removendo travas eventuais do apt ##
sudo rm /var/lib/dpkg/lock-frontend ; sudo rm /var/cache/apt/archives/lock ;
## Atualizando o repositório ##
sudo apt update &&