Skip to content

Instantly share code, notes, and snippets.

View FabricioFFC's full-sized avatar

Fabrício Ferrari de Campos FabricioFFC

View GitHub Profile
import React from 'react';
import {
StyleSheet,
Text,
Image,
View
} from 'react-native';
const TeamItem = ({ item }) => {
return (
import React, { Component } from 'react';
import { StyleSheet, View, FlatList, Text, ActivityIndicator } from 'react-native';
import TeamItem from './TeamItem';
import teamsApi from '../api/TeamsApi';
class TeamsList extends Component {
state = { countries: [], loading: true };
async componentDidMount() {
const teamsApiUrl = 'http://private-c09d5b-worldcup20181.apiary-mock.com/teams';
async function getAll() {
try {
const response = await fetch(teamsApiUrl);
const responseJson = await response.json();
return responseJson;
} catch (error) {
console.error(error);
import React from 'react';
import {
StyleSheet,
Text,
} from 'react-native';
const TeamItem = ({ item }) => <Text style={styles.item}>{item.key}</Text>
const styles = StyleSheet.create({
import React, { Component } from 'react';
import { StyleSheet, FlatList, Text } from 'react-native';
import TeamItem from './TeamItem';
const countries = [
{ key: 'Alemanha' },
{ key: 'Arábia Saudita' },
{ key: 'Argentina' },
{ key: 'Austrália' },
import React from 'react';
import {
StyleSheet,
Text,
View
} from 'react-native';
const Header = ({ title }) => {
return (
<View>
@FabricioFFC
FabricioFFC / solutions.rb
Last active November 14, 2015 14:18
codility tests
# solution for equi exercise
def equi(a)
right_sum = a.inject(:+)
left_sum = 0
a.each_with_index do |value, index|
left_sum += value
return index if left_sum == right_sum
right_sum -= value
end
-1
@FabricioFFC
FabricioFFC / magento-dev-vizir.md
Created November 6, 2015 20:12
magento-dev-vizir

Procuramos Desenvolvedores com experiência com Magento.

##Requisitos:

  • Experiência em desenvolvimento de e-commerce com Magento;
  • Sólidos conhecimentos em PHP, ou seja, se considere bom e tenha um histórico de projetos na linguagem, utilizando boas práticas;
  • Gostar de resolver problemas;
  • Gostar de aprender;
  • Valorize o trabalho em equipe;

##Diferenciais:

@FabricioFFC
FabricioFFC / smart-date-poc.js
Created October 24, 2015 09:29
smart-date-poc
var smartDate = {
addDays: function addDays(value) {
this.setDate(this.getDate() + value * 1);
return this;
}
};
smartDate.addDay = smartDate.addDays;
smartDate.adddays = smartDate.addDays;
smartDate.addday = smartDate.addDays;
@FabricioFFC
FabricioFFC / .zshrc
Created September 10, 2015 16:08
.zshrc
# For Golang
# Path to your oh-my-zsh installation.
export ZSH=/Users/fabricio/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"