Skip to content

Instantly share code, notes, and snippets.

View lhas-dev's full-sized avatar

Luiz Almeida lhas-dev

View GitHub Profile
@lhas-dev
lhas-dev / remote_config_firebase.js
Last active April 22, 2022 13:27
How to use Remote Config in Firebase for A/B Testing
import remoteConfig from '@react-native-firebase/remote-config'
const fetchConfig = async () => {
await remoteConfig().setConfigSettings({
isDeveloperModeEnabled: __DEV__,
minimumFetchInterval: 0
})
await remoteConfig().fetchAndActivate()
}
@lhas-dev
lhas-dev / gist:4dc70936e321b6eafbb51b3c3f7f9d96
Created May 25, 2020 05:58
COMO INSTALAR O POSTGRESQL EM UM SERVIDOR LINUX (UBUNTU) | DevOps #1
1) Criar Linode "gandalf-1";
2) Copiar chave SSH:
cat ~/.ssh/id_rsa.pub
3) Atualizar SO:
apt-get update && apt-get upgrade
@lhas-dev
lhas-dev / LoginScreen.tsx
Last active December 7, 2019 01:03
Context API Sample for Authentication
import React, { useState, useEffect } from "react";
import { RouteComponentProps } from "react-router-dom";
import { useAuth } from "contexts/auth";
interface LoginProps extends RouteComponentProps {}
const Login = ({ history }: LoginProps) => {
const auth = useAuth();
// Redirect if already authenticated