Skip to content

Instantly share code, notes, and snippets.

View renanmav's full-sized avatar
🏎️
Quando penso que cheguei ao meu limite, descubro que tenho forças para ir além.

Renan Mav renanmav

🏎️
Quando penso que cheguei ao meu limite, descubro que tenho forças para ir além.
View GitHub Profile
import fs from 'fs';
import path from 'path';
import { danger, warn, schedule } from 'danger';
import jest from 'danger-plugin-jest';
import spellcheck from 'danger-plugin-spellcheck';
import todos from 'danger-plugin-todos';
import yarn from 'danger-plugin-yarn';
// Setup
import fs from 'fs';
import path from 'path';
import { promisify } from 'util';
import { printSchema } from 'graphql/utilities';
import schema from '@sejamelhoramigo/graphql/src/schema';
const writeFileAsync = promisify(fs.writeFile);
"""Address"""
type Address {
fullAddress: String
shortAddress: String
zipcode: String
street: String
number: String
neighborhood: String
city: String
state: String
import path from 'path';
import type { ExpoConfig, ConfigContext } from '@expo/config';
export default ({ config }: ConfigContext): ExpoConfig => ({
expo: {
...config,
name: 'sejamelhoramigo',
slug: 'sejamelhoramigo',
platforms: ['ios', 'android', 'web'],
@renanmav
renanmav / ReasonRelay.re
Created May 15, 2020 14:43
My changes to remove the option of response within onCompleted on the commitMutation function
type _commitMutationConfig('variables, 'response) = {
mutation: mutationNode,
variables: 'variables,
onCompleted:
option(('response, Js.Nullable.t(array(mutationError))) => unit),
onError: option(Js.Nullable.t(mutationError) => unit),
optimisticResponse: option('response),
optimisticUpdater: option(optimisticUpdaterFn),
updater: option(updaterFn('response)),
};
@renanmav
renanmav / deps.txt
Created May 11, 2020 17:08
Deps that uses UIWebView in sense-chat-mobile
../node_modules/react-native-device-info/ios/RNDeviceInfo/RNDeviceInfo.m
../node_modules/react-native-maps/ios/build/Build/Products/Debug-iphonesimulator/React/libReact.a
../node_modules/react-native-maps/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React.build/Objects-normal/x86_64/RCTWebView.o
../node_modules/react-native-maps/ios/build/ModuleCache.noindex/3RS3JN9HVPBL7/UIKit-1V5UHAPTOD24G.pcm
../node_modules/react-native-maps/ios/build/ModuleCache.noindex/3RS3JN9HVPBL7/modules.idx
../node_modules/react-native-maps/ios/build/ModuleCache.noindex/CEMG215KE65F/UIKit-1V5UHAPTOD24G.pcm
../node_modules/react-native-maps/ios/build/ModuleCache.noindex/CEMG215KE65F/WebKit-3M3AFHBPPA3AE.pcm
../node_modules/react-native-maps/ios/build/ModuleCache.noindex/CEMG215KE65F/modules.idx
../node_modules/react-native-maps/ios/build/ModuleCache.noindex/7M428SZDQ9GN/UIKit-1V5UHAPTOD24G.pcm
../node_modules/react-native-maps/ios/build/ModuleCache.noindex/7M428SZDQ9GN/modules.idx
import React from 'react';
import { Image, TouchableWithoutFeedback, View } from 'react-native';
import { t } from 'react-native-tailwindcss';
const s = {
wrapper: [t.bgTransparent, t.w4_12, t.p1, { aspectRatio: 1 }],
field: [t.bgBlue900, t.rounded, t.flex1, t.itemsCenter, t.justifyCenter, t.overflowHidden],
symbol: [t.w8_12, t.objectContain],
success: [t.bgGreen900],
};
@renanmav
renanmav / MyRelayComponent.spec.tsx
Created October 2, 2019 20:54
Simple test of relay component using rtl and relay-test-utils
import rtl from 'react-test-renderer'
import { createMockEnvironment, MockPayloadGenerator } from 'relay-test-utils'
import MyRelayComponent from './MyRelayComponent'
test('Data Render', () => {
const environment = createMockEnvironment()
const renderer = rtl.create(<MyRelayComponent environment={environment} />)
environment.mock.resolveMostRecentOperation(operation => MockPayloadGenerator.generate(operation))
@renanmav
renanmav / package.json
Last active September 27, 2019 13:55
Dependencies of react-relay v6
{
"private": true,
"dependencies": {
"@types/react": "*",
"@types/relay-runtime": ">=6.0.3",
}
}
@renanmav
renanmav / environment.js
Created September 20, 2019 20:09
Setup RelayNetworkLogger with relay-runtime v6
import { Network } from 'relay-runtime'
import createRelayNetworkLogger from 'relay-runtime/lib/network/createRelayNetworkLogger'
import RelayNetworkLoggerTransaction from 'relay-runtime/lib/network/RelayNetworkLoggerTransaction'
import cacheHandler from './cacheHandler'
const RelayNetworkLogger = createRelayNetworkLogger(RelayNetworkLoggerTransaction)
const network = Network.create(