Skip to content

Instantly share code, notes, and snippets.

View brunoventura's full-sized avatar
✈️
Travel and code

Bruno Ventura brunoventura

✈️
Travel and code
  • Kovi
  • Florianópolis
View GitHub Profile
@brunoventura
brunoventura / gulpfile.js
Last active March 10, 2016 17:43
Gulp + Browserify + Babel + Error Handler = ❤️
const gulp = require('gulp');
const browserify = require('browserify');
const babelify = require('babelify');
const source = require('vinyl-source-stream');
const connect = require( 'gulp-connect' );
const path = {
files: './static/**/*',
entryFile: './static/lib/app.js',
build: './build/',
'use strict';
const obj = {};
const map = new Map;
const total = 99999999;
for (var i = 0; i < 100000; i++) {
obj['_'+i] = true;
map.set('_'+i, true);
}
@brunoventura
brunoventura / csv_import_magic.js
Last active January 11, 2017 21:45 — forked from ianlewis/csv_import_magic.js
A Google Apps Script for importing CSV data into a Google Spreadsheet.
// vim: ft=javascript:
/*jslint sloppy: true, vars: true, white: true, nomen: true, browser: true */
/*global SpreadsheetApp, UiApp, UrlFetchApp, Utilities */
/*
* A script to automate requesting data from an external url that outputs CSV data.
*
* Adapted from the Google Analytics Report Automation (magic) script.
* @author nickski15@gmail.com (Nick Mihailovski)
* @author ianmlewis@gmail.com (Ian Lewis)
*/
{
"env": {
"mocha": true
},
"parserOptions": {
"sourceType": "script"
},
"globals": {
"chubaca": true,
"expect": true,
alert()
alert(1)
est_gp = SymbolicRegressor ( population_size = 5000 ,
generations = 20, stopping_criteria = 0.01,
p_crossover = 0.7, p_subtree_mutation = 0.1,
p_hoist_mutation = 0.05, p_point_mutation = 0.1,
max_samples = 0.9, verbose = 1 ,
parsimony_coefficient = 0.01, random_state = 0 )
@brunoventura
brunoventura / medium-fetch.js
Last active February 4, 2018 14:33
Gist to demonstrate how integrate medium posts with wix collection
import { fetch } from 'wix-fetch';
import data from 'wix-data';
const USER = 'cecosmos';
const POST_BASE_PATH = `https://medium.com/${USER}/`;
const FEED_PATH = `${POST_BASE_PATH}latest?format=json`;
const IMG_CND_BASE_PATH = `https://cdn-images-1.medium.com/max/500/`;
const savePost = post => data.save('posts', {
_id: post.id,
@brunoventura
brunoventura / day1.html
Last active September 24, 2018 05:47
30 days of React samples
<html>
<head>
<meta charset="utf-8">
<title>Hello world</title>
<!-- Script tags including React -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>
<body>
class HelloWorld extends React.Component {
render() {
return (
<h1 className='large'>Hello World</h1>
);
}
}