Skip to content

Instantly share code, notes, and snippets.

Marcello Pontes marpontes

Block or report user

Report or block marpontes

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
marpontes /
Created Oct 5, 2017
Pass --disable-gpu down to Electron apps on mac (Slack, Whatsapp, Trello, ...)

On my Macbook Pro (OS X El Capitan) I was having issues on Electron based apps. These apps had visual issues/glitches like blank screens, visual components showing only when hovering or transparent menus.

By opening with these comands, the problems disappeared.

open /Applications/ --args --disable-gpu
open /Applications/ --args --disable-gpu
open /Applications/ --args --disable-gpu
marpontes / offline-video-and-bindings.js
Created Oct 17, 2016
Reveal.js custom controls - offline video with custom key bindings
View offline-video-and-bindings.js
Autoplay mp4 video and key bindings
var vidIdx = 13;
var vidId = "demoVid";
var vid = document.getElementById(vidId);
Reveal.addEventListener( 'slidechanged', vidControl );
Reveal.addEventListener( 'ready', vidControl );
View fato_impeachment.sql
-- PostgreSQL database dump
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
marpontes / chart-responsivo.js
Created Nov 24, 2015
Habilitando os gráficos do CDE a responderem a mudanças de layout.
View chart-responsivo.js
/* [Dashboards compatíveis com requirejs]
Solução componente a componente
Colocar no Post Execution:
var comp = this, elm = $("#"+comp.htmlObject);
comp.chart.options.width = elm.width();
comp.chart.render(/*bypassAnimation*/true, /*recreate*/true, /*reload*/false);
marpontes / conditional-running-totals.mdx
Created Sep 27, 2015
Some crazy MDX Demonstration to my fellow friend @maialson
View conditional-running-totals.mdx

WITH MEMBER [Measures].[one] as 1 MEMBER [Measures].[condic] as iif( inStr([Customers],"a")>0, 0,[Measures].[one]) MEMBER [Measures].[Sequential] as rank( [Customers].currentMember, extract( nonEmptyCrossjoin( nonEmptyCrossjoin( [Territory].currentMember,

marpontes /
Created May 27, 2015
Resumo do material da Oncase para o #pentahoday15


Lista com links para download dos PDFs das apresentações utilizadas


Ferramentas de Mineração de dados com o PDI Mailson Santos @maialson

marpontes /
Created May 27, 2015
Program and links to #pentahoday15 minicourse "Dashboards elegantes com CDE/Bootstrap"

Dashboards elegantes com CDE/Bootstrap

  1. Pré-requisitos
  • Web!
    • CSS
    • Javascript
    • Ajax
    • jQuery
View gist:648d915dad072f7fb2d6
marpontes / gist:8919021
Last active Aug 29, 2015
Idea for CEP [brazilian postal code] GEO webservice - this is a sample document that will be store in Mongodb postal collection.
View gist:8919021
* Model of document to be stored, maintained and incremented
"_id": "51111040",
"pos": [-35.2560503, -5.896805199999999],
"cntr": {
"n": "Brazil",
marpontes / drill-param-control.js
Last active Dec 20, 2015
This is basically an object created to make it easy to handle the multi-valued MDX-formatted inputs being passed down to another artifacts, from a Pentaho CDE Dashboard to an Analyzer Report, for example. If the parameter is mdx-like, is multi-valued and the first is "All", then it fits!
View drill-param-control.js
* This is basically an object created to make it easy to
* Handle the multi-valued MDX-formatted inputs being passed down to
* another artifacts, from a CDE Dashboard to an Analyzer Report, for example
* by @marpontes
* Ex
* <div id="SupplierHolder">
* <select multiselect>
You can’t perform that action at this time.