Skip to content

Instantly share code, notes, and snippets.

View bvodola's full-sized avatar

Brunno Vodola Martins bvodola

View GitHub Profile
@bvodola
bvodola / materialize-grid.css
Created March 24, 2017 17:54
Materialize Grid
.container {
margin: 0 auto;
max-width: 1280px;
width: 90%;
}
@media only screen and (min-width: 601px) {
.container {
width: 85%;
}
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import CircularProgress from 'material-ui/CircularProgress';
import FontIcon from 'material-ui/FontIcon';
// UploadedFiles
// Renders the array of uploaded files
class UploadedFiles extends Component {
const express = require('express');
const http = require('http');
const path = require('path');
const bodyParser = require('body-parser');
// ==============
// Initial Config
// ==============
const app = express();
const port = process.env.PORT || 4000;
import React from 'react';
import Radium from 'radium';
import { merge, getNested } from './';
import { screen, col, flexCenter } from './grid';
import Text from './Text';
const cellStyle = {
display: 'table-cell',
verticalAlign: 'middle',
padding: '8px',
<View style={{display: this.state.visible?'flex':'none', backgroundColor: 'rgba(0,0,0,0.5)', position: 'absolute', top: 0, left: 0, height, width}}>
<Modal animationType={'slide'} transparent={true} visible={this.state.visible}>
<TouchableWithoutFeedback onPress={() => this.toggleActionSheet()}>
<View>
<TouchableWithoutFeedback>
<View style={{backgroundColor: '#fff', padding: 16, marginTop: '100%', height: '50%'}}>
<Text style={{height: 20}}>Title</Text>
// Content goes here...
</View>
</TouchableWithoutFeedback>
@bvodola
bvodola / index.js
Created October 16, 2018 16:01
Pixel/index.js
import React from 'react'
import Head from 'next/head'
import FACEBOOK_PIXEL_1 from './facebook/pixel-1'
export default ({name}) => {
return(
<Head>
{name === 'FACEBOOK_PIXEL_1' && <FACEBOOK_PIXEL_1 />}
@bvodola
bvodola / facebook-pixel-example.html
Created October 16, 2018 16:08
Facebook Pixel Example
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
import React from 'react'
export default () =>
<React.Fragment>
<script dangerouslySetInnerHTML={{ __html: `!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
// Some random page example
import Pixel from '../components/Pixel'
export default () =>
<div>
<Pixel name='FACEBOOK_PIXEL_1' />
</div>
import React from 'react';
import globals from '../../globals';
import axios from 'axios';
import Loading from '../Loading/Loading';
import VMasker from 'vanilla-masker';
class Form extends React.Component {
constructor(props) {
super(props);
this.handleSubmit = this.handleSubmit.bind(this);