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
marpontes / disable-gpu-mac.md
Created Oct 5, 2017
Pass --disable-gpu down to Electron apps on mac (Slack, Whatsapp, Trello, ...)
View disable-gpu-mac.md

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/Slack.app/ --args --disable-gpu
open /Applications/Trello.app/ --args --disable-gpu
open /Applications/Whatsapp.app/ --args --disable-gpu
@marpontes
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 );
Reveal.configure({
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
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:
*/
function(){
var comp = this, elm = $("#"+comp.htmlObject);
$(window).resize(function(){
comp.chart.options.width = elm.width();
comp.chart.render(/*bypassAnimation*/true, /*recreate*/true, /*reload*/false);
@marpontes
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].currentMember.name,"a")>0, 0,[Measures].[one]) MEMBER [Measures].[Sequential] as rank( [Customers].currentMember, extract( nonEmptyCrossjoin( nonEmptyCrossjoin( [Territory].currentMember,

@marpontes
marpontes / oncase-pentahoday15.md
Created May 27, 2015
Resumo do material da Oncase para o #pentahoday15
View oncase-pentahoday15.md

Palestras

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

   

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

@marpontes
marpontes / pentahoday15-cde-bootstrap.md
Created May 27, 2015
Program and links to #pentahoday15 minicourse "Dashboards elegantes com CDE/Bootstrap"
View pentahoday15-cde-bootstrap.md

Dashboards elegantes com CDE/Bootstrap

  1. Pré-requisitos
  • Web!
    • CSS
    • Javascript
    • Ajax
    • jQuery
View gist:648d915dad072f7fb2d6
http://getbootstrap.com
https://chrome.google.com/webstore/detail/window-resizer/kkelicaakdanhinjdeammmilcgefonfh?hl=en
http://loudev.com
@marpontes
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
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.