Skip to content

Instantly share code, notes, and snippets.

View AndreiCalazans's full-sized avatar
🏠
Working from home

Andrei Xavier de Oliveira Calazans AndreiCalazans

🏠
Working from home
View GitHub Profile
@AndreiCalazans
AndreiCalazans / SimpleAnimationMount.js
Created September 7, 2023 18:32
Simple Animation using Animated to see performance.
import React, { useEffect, useRef, useState } from "react";
import { Animated, View, StyleSheet, Dimensions, TouchableOpacity, Button, Text } from "react-native";
const colors = ['#000000', '#212121']
const size = Dimensions.get("window").width / 10;
const Element = ({native = true}) => {
@AndreiCalazans
AndreiCalazans / airlines.json
Last active August 1, 2023 11:38
List of Airlines 2 letter code
{
"U2": "easyjet",
"1T": "Bulgarian Air Charter",
"Q5": "40-Mile Air",
"4O": "Interjet",
"7A": "Express Air Cargo",
"JY": "Air Turks and Caicos",
"JU": "Air Serbia",
"QH": "Kyrgyzstan",
"A8": "Benin Golf Air",
@AndreiCalazans
AndreiCalazans / vaga_ux_product_designer.md
Last active March 30, 2023 12:49
Dono/Gerente de Produto

Descrição da vaga

Buscamos um gerente de produto/product designer para nos ajudar a criar um produto que vai trazer a tecnologia ao campo. Veja quem somos.

Quer ser 100% dono da área da tecnologia e fazer parte de uma start-up em seu início?

Requisitos

  • Experiência com a criação de UX.
  • Capacidade de gestão.
import { useCallback, useEffect, useMemo } from 'react';
// eslint-disable-next-line no-restricted-imports
import { loadQuery as relayLoadQuery, LoadQueryOptions } from 'react-relay';
import {
GraphQLTaggedNode,
OperationType,
usePreloadedQuery as usePreloadedQueryDataLayer,
useRelayEnvironment,
VariablesOf,
} from '@cbhq/data-layer';
@AndreiCalazans
AndreiCalazans / DebugDeterministicPerformance.tsx
Created November 17, 2022 17:19
Debug Deterministic Performance screen
/* eslint-disable @cb/react-no-untranslated-string */
import React, {
Suspense,
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from 'react';
import { Dimensions, Pressable, View } from 'react-native';
@AndreiCalazans
AndreiCalazans / VAGA_AGRO_ATLAS_PLENO.md
Created July 12, 2022 13:22
Desenvolvedor JavaScript/TypeScript na Agro Atlas Brasil

Descrição da vaga

Buscamos um desenvolvedor que saiba JavaScript e/ou TypeScript para criação de infraestrutura e aplicações para o Agronegócio. Veja quem somos.

Quer ser 100% dono da área da tecnologia e fazer parte de uma start-up em seu início?

Requisitos

  • JavaScript/TypeScript
  • React
@AndreiCalazans
AndreiCalazans / VAGA_AGRO_ATLAS_SENIOR.md
Last active July 12, 2022 13:19
Engenheiro de Software Full Stack na Agro Atlas Brasil

Descrição da vaga

Buscamos um engenheiro de software para criação de infraestrutura e aplicações para o Agronegócio. Veja quem somos.

Quer ser 100% dono da área da tecnologia e fazer parte de uma start-up em seu início?

Requisitos

  • JavaScript
  • React
@AndreiCalazans
AndreiCalazans / test_android.sh
Created May 12, 2022 13:33
Script to run launch Android and retrieve some performance logs
const { exec } = require('child_process');
const _exec = async (command) => {
return new Promise((res) => {
exec(command, (error, stdout) => {
if (error !== null) {
console.log(`exec error: ${error}`);
}
res(stdout);
});
@AndreiCalazans
AndreiCalazans / GuessGame.sol
Last active May 11, 2022 15:28
WIP - GuessGame Solidity Smart Contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
// Start game with a passphrase & reward
// Contract creator needs to have funds?
// Each address can only guess once (use modifier for this)
// Once correct guess give reward
// Add a game over modifier
contract GuessGame {
@AndreiCalazans
AndreiCalazans / parseJsonAndLogIfError.ts
Created April 3, 2022 13:49
Unexpected token U in JSON at position 0 is a very common error that happens in JavaScript due to JSON.parse trying to parse an undefined value, always try-catch JSON.parse.
// Unexpected token U in JSON at position 0 is a very common error that happens in JavaScript due to JSON.parse trying to parse an undefined value, always try-catch JSON.parse.
export function parseJsonAndLogIfError(
data: string,
context: string,
): unknown {
try {
return JSON.parse(data);
} catch (e) {
Bugsnag.notify(`Tried to JSON parse invalid value: ${data} in ${context}`);