Skip to content

Instantly share code, notes, and snippets.

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

Diego Rodrigues Vieira diegorodriguesvieira

🏠
Working from home
View GitHub Profile
@diegorodriguesvieira
diegorodriguesvieira / interview-questions.md
Created December 14, 2016 23:55 — forked from jvns/interview-questions.md
A list of questions you could ask while interviewing

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@diegorodriguesvieira
diegorodriguesvieira / isIphoneX.js
Created September 22, 2017 17:43
Detects on react-native if device is iPhone X
import { Dimensions, Platform } from 'react-native';
const isIphoneX = () => {
const dimen = Dimensions.get('window');
return (
Platform.OS === 'ios' &&
!Platform.isPad &&
!Platform.isTVOS &&
(dimen.height === 812 || dimen.width === 812)
);
## Chests
Como criar um baú de chest?
- Vá até o map editor, adicione um baú de chest
- Coloque um item dentro
- Coloque 2000 em ```actionid```
- Coloque um ID único no ```uniqueid```, pois este será o storage ID
---

Chests

Como criar um baú de chest?

  • Vá até o map editor, adicione um baú de chest
  • Coloque um item dentro
  • Coloque 2000 em actionid
  • Coloque um ID único no uniqueid, pois este será o storage ID

@diegorodriguesvieira
diegorodriguesvieira / README.md
Created November 28, 2017 10:19 — forked from nickpiesco/README.md
DRY out Media Queries with React and Radium

Here at Bloomfire, we’re loving building new components with React. We’re even going all in with using ES6 modules and inline styles. (‘Inline styles?!’ I hear you say? Don’t knock it ’til you’ve tried it.)

There’s a lot of cool stuff we can do with CSS that we can’t do with inline styles, though; and that’s where Radium comes in. Radium not only provides a handy way to style :hover, :focus, and :active states, but it also deftly handles media queries. If you’re using inline styles in React and not using Radium, you should. I’ll give you a minute to go look it over – here’s the link again.

Back? Okay.

We create a style object in each of our React components, which we then reference in the JSX below. Here’s a super-stripped-down example:

// [myAwesomeButton.js]
@diegorodriguesvieira
diegorodriguesvieira / webSocket.js
Created February 27, 2018 22:43 — forked from woraperth/webSocket.js
JavaScript Singleton to connect to WebSocket (originally for React project)
// Thank you Ranatchai Chernbamrung for sample socketIO singleton pattern
// This code is originally for my React project, but should work with any ES6 project that support `import` statement
// How it works
// 1. Create webSocket.js to establish the connection and retrieve the connection
// 2. In main file, import webSocket.js to establish the connection
// 3. In other component files, import webSocket.js to retrieve the connection
// webSocket.js
let client

Teste para vaga Front-End

Regras

  • Deve-se utilizar obrigatóriamente os seguintes recursos: material-ui, reactjs, redux, redux-form e react-router, além destes, é permitido utilizar qualquer outra biblioteca.

  • Implementar as telas responsivas.

  • Inserir validações no formulário.

$ cd node_modules/react-native/scripts && ./ios-install-third-party.sh && cd ../../../
$ cd node_modules/react-native/third-party/glog-0.3.5/ && ../../scripts/ios-configure-glog.sh && cd ../../../../

Now Xcode builds fine.

Originally posted by @mattijsf in facebook/react-native#21168 (comment)

@diegorodriguesvieira
diegorodriguesvieira / styled-components.js
Last active November 13, 2018 16:30
styled-components
import {
Colors, withTheme, Surface, TouchableRipple,
} from 'react-native-paper';
import { StyleSheet, ActivityIndicator } from 'react-native';
import color from 'color';
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
import styled from 'styled-components/native';
const { white, black } = Colors;
import {
Colors, withTheme, Surface, TouchableRipple, Text,
} from 'react-native-paper';
import { View, StyleSheet, ActivityIndicator } from 'react-native';
import color from 'color';
import PropTypes from 'prop-types';
import React, { PureComponent } from 'react';
const { white, black } = Colors;