Skip to content

Instantly share code, notes, and snippets.

View leandrojo's full-sized avatar
🎯
Focusing

Leandro Araújo leandrojo

🎯
Focusing
  • São Paulo, Brasil
View GitHub Profile
data = [
{
description: 'Taxa de Juros',
value: '1.35',
},
{
description: 'Parcela',
value: '450.05',
},
];
// ... code wharever.
return (
<View style={styles.Item}>
<Circle
width={50}
strokeColor="#F00"
/>
<Icon />
</View>
);
/* @flow */
import React, { Component } from 'react';
import { ART, View } from 'react-native';
type Props = {
strokeWidth: number,
strokeColor: string,
width: number,
};
import React from 'react';
import { Redirect, Route } from 'react-router-dom';
type Props = {
authed: boolean,
component: React.Component,
};
class PrivateRoute extends React.Component<void, Props, void> {
state = {};
@leandrojo
leandrojo / csv-parse.js
Last active March 20, 2018 01:01
Ler CSV e transforma em um array.
window.onload = function() {
var fileInput = document.getElementById('fileInput');
var fileDisplayArea = document.getElementById('fileDisplayArea');
fileInput.addEventListener('change', function(e) {
var file = fileInput.files[0];
var textType = /csv.*/;
if (file.type.match(textType)) {
/**
* @param {*} obj - Objeto a ser rastreado.
* @param {*} key - Percurso a ser traçado.
*
* Exemplo:
* const obj = { a: { b: c: 100 } };
* get(obj, 'a.b.c'); // return 100.
*/
export default function Get(obj, key) {
.Blogo {
background-color: rgba(240, 240, 240, 1);
font-family: sans-serif;
margin: 25px 10px;
padding: 1em;
&__Toolbar {
padding: 0 .3em .8em;
}
const request = require('request-promise');
const parseString = require('xml2js').parseString;
const q = require('q');
const _ = require('underscore');
const moment = require('moment');
// Em algum framework com funcionamento por middleware onde
// hook oferece informações da requisição.
const find = function (hook) {
{
Categorias: [
{
name: "Assist. Técnica",
profissoes: [
{
name
}
]
import _ from 'underscore';
import s from 'underscore.string';
function renderMarker(markers) {
// Se Educação Física...
return _.each(markers, (marker) => {
// ... na lista ele retorna educacao_fisica.svg.
return returns.slugify(marker) + ".svg";
});