Skip to content

Instantly share code, notes, and snippets.

View bernardodiasc's full-sized avatar

Bernardo Dias bernardodiasc

View GitHub Profile
@bernardodiasc
bernardodiasc / pegarato.html
Created April 18, 2021 17:36
Jogo desenvolvido com meus filhos de 12 e 8 anos de idade
<!DOCTYPE html>
<html>
<head>
<title>JOGO PEGA RATO</title>
<style>
html {
height: 100%;
}
const axios = require('axios')
class API {
constructor({ url }){
this.url = url
this.endpoints = {}
}
/**
* Create and store a single entity's endpoints
@bernardodiasc
bernardodiasc / 00.src.md
Last active August 29, 2017 17:19
NodeJS HTML template generator pure JavaScript
src/
├── pages
│   ├── posts
│   │   └── post-1.js
│   └── index.js
├── static
│   ├── assets
│   │   ├── images
│ │ ├── scripts
@bernardodiasc
bernardodiasc / Tooltip.js
Created March 31, 2017 16:55
Tooltip component
import React, { PropTypes } from 'react';
import classNames from 'classnames';
const Tooltip = ({ children, text, position, hover, onHover, theme }) => {
const popup = classNames(theme.popup, theme[position]);
return (
<span
className={theme.tooltip}
onMouseEnter={() => onHover(true)}
onMouseLeave={() => onHover(false)}

What takes (sort of) to have React+Redux SPA setup:

// This is used in a SPA setup using react and redux
import matchRoutes from 'react-router/lib/matchRoutes';
import { createRoutes } from 'react-router';
import { routerReducer } from 'react-router-redux';
import { Route, IndexRoute } from 'react-router';
import { useRouterHistory } from 'react-router';
import { syncHistoryWithStore, routerMiddleware } from 'react-router-redux';

JSON Schema validation

When dealing with data, the information is abstracted into a given structure, data are then pieces of information. In any application, the data can be semantically present in more than one and different structures, for instance, the database holds the application data with a structure that is not necessarily the same structure that the data is exposed in the web interface, but the data is still the same.

The more transformations, more complicated, as you have imagined. What happens in these transformations is a lot of code. There is the server-side with databases and integrations, there is the client-side with web, mobile, and many other applications. Many different ways to make all data transformations in all these different places.

The schema is the rules that configures the data structure. In JSON for instance, the data belongs to pieces called members. A member have the name and other properties, most important the type, that can be string, object or array, the schema defi

<p><strong>ORIENTAÇÕES PARA LOCALIZAÇÃO DAS CONDICIONANTES DO EMPREENDIMENTO</strong></p>
<p>As condicionantes relativas ao Gasoduto Caraguatatuba-Taubaté (GASTAU), implantado a partir da Unidade de Tratamento de Gás e de Condensado de Caraguatatuba - UTGCA, em Caraguatatuba/SP, até a Estação de Compressão de Taubaté (ECOMP de Taubaté), em Taubaté/SP, encontram-se:</p>
<ul>
<li>No Item 7 “Medidas Mitigatórias e Compensatórias e Programas de Controle de Monitoramento” do Estudo de Impacto Ambiental do empreendimento;</li>
</ul>
<p>Fonte: <a href="http://licenciamento.ibama.gov.br/Dutos/Gasoduto/GASTAU/EIA%20CARAGUA-TAUBATE.pdf">http://licenciamento.ibama.gov.br/Dutos/Gasoduto/GASTAU/EIA%20CARAGUA-TAUBATE.pdf</a></p>
<ul>
<li>Na Licença Prévia LP nº 257/2007, páginas 2-4;</li>
<li>Na Licença de Instalação LI nº 522/2008, páginas 2-5;</li>
<li>Na Autorização de Supressão de Vegetação ASV nº 247/2008, páginas 2-3;</li>
.politic.col-sm-6.col-md-4.col-lg-3.yes:after {
content: '';
display: block;
width: 15px;
height: 15px;
position: absolute;
z-index: 9;
background: red;
border-radius: 50%;
top: 27%;
abre o editor do browser na pagina http://www1.folha.uol.com.br/especial/2015/brasil-em-crise/votacao-impeachment/camara/
e cola o css abaixo:
.politic.col-sm-6.col-md-4.col-lg-3.yes:after {
content: '';
display: block;
width: 15px;
height: 15px;
position: absolute;