Skip to content

Instantly share code, notes, and snippets.

View fernandojunior's full-sized avatar

Fernando Felix fernandojunior

  • Brazil
View GitHub Profile
@fernandojunior
fernandojunior / gist:7064132b655905bebb97
Last active May 17, 2022 21:15
Simple lib to execute a mdx query using saiku rest api
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<!-- https://raw.githubusercontent.com/fernandojunior/prototype_class.js/v1.0.0/prototype_class.min.js -->
<script type="text/javascript" src="prototype_class.min.js"></script>
<script type="text/javascript">
// needs prototype_class.min.js (https://github.com/fernandojunior/prototype_class.js) and jquery
var SaikuUtils = Class.simple_extend({
//-----------------------------------------------------------------------
// Part of the LINQ to JavaScript (JSLINQ) v2.10 Project - http://jslinq.codeplex.com
// Copyright (C) 2009 Chris Pietschmann (http://pietschsoft.com). All rights reserved.
// This project is licensed under the Microsoft Reciprocal License (Ms-RL)
// This license can be found here: http://jslinq.codeplex.com/license
//-----------------------------------------------------------------------
(function() {
JSLINQ = window.JSLINQ = function(dataItems) {
return new JSLINQ.fn.init(dataItems);
};
@fernandojunior
fernandojunior / gist:2a364d8b0b1885900385
Last active August 29, 2015 14:09
JavaScript Data Query
http://stackoverflow.com/questions/3083180/querying-data-with-javascript
http://stackoverflow.com/questions/6786307/what-options-are-available-for-client-side-javascript-orm
http://www.getbreezenow.com/breezejs
- http://jaydata.org/
+- http://zef.me/2774/persistence-js-an-asynchronous-javascript-orm-for-html5gears/
+ http://www.getbreezenow.com/breezejs
++ http://jsinq.codeplex.com/
+++ http://jslinq.codeplex.com/
@fernandojunior
fernandojunior / gist:1596ff6bce842a294920
Created October 29, 2014 23:06
Simple JavaScript foreach lib with delay / timeout
// author: Fernando Felix do Nascimento Junior
// License: The MIT License
// example
forEach({
data: [1, 2, 3, 4, 5, 6],
timeout: 5000,
step_by: 2,
callback: function (value) {
console.log(value);
@fernandojunior
fernandojunior / gist:df03b28fce24ac36c3c5
Last active August 8, 2018 01:52
Saiku rest api over Pentaho 5.0.1
// http://demo.analytical-labs.com/saiku/serverdocs/rest.html
[{
"url": "http://localhost:8080/pentaho/plugin/saiku/api/admin/discover",
"type": "get",
"description": "Returns the datasources available."
},
{
"url": "http://localhost:8080/pentaho/plugin/saiku/api/admin/repository?type=saiku&path=/home/admin/001.saiku",
"type": "get",
package org.saiku.web;
import java.net.URL;
import java.util.UUID;
import junit.framework.TestCase;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.methods.GetMethod;
@fernandojunior
fernandojunior / gist:71d781f2947f45515b5b
Last active August 29, 2015 14:08
Online gist renders
http://gist.io/
http://www.roughdraft.io/
http://htmlpreview.github.io/
https://rawgit.com/
http://bl.ocks.org/
@fernandojunior
fernandojunior / gist:17b027e3d5996721abe3
Created October 15, 2014 08:08
Scripts to install Pillow on ubuntu
#!/bin/bash
# Script to install Pillow dependencies on Ubuntu based on
# https://pillow.readthedocs.org/installation.html#linux-installation
# http://askubuntu.com/questions/507459/pil-install-in-ubuntu-14-04-1-lts
# http://stackoverflow.com/questions/2967224/gcc-error-trying-to-install-pil-in-a-python2-6-virtualenv
# By Fernando Felix do Nascimento Junior
# become superuser
sudo su
@fernandojunior
fernandojunior / gist:367360e12233ca82a1ce
Last active August 29, 2015 14:07
Shell script to install mongodb 10gen on ubuntu
#!/bin/bash
# Script based on How to install mongoDB on Ubuntu Tutorial (http://www.mkyong.com/mongodb/how-to-install-mongodb-on-ubuntu/)
# By Fernando Felix do Nascimento Junior
# become superuser
sudo su
# add mongodb 10gen package to /etc/apt/sources.list.d
touch /etc/apt/sources.list.d/mongo.list
@fernandojunior
fernandojunior / gist:e3e1131cceb0a9888cf6
Created October 14, 2014 05:19
Erro ao tentar criar um novo modelo OLAP no plugin AgileBI do Pentaho Data Integration 5.0.1
org.pentaho.agilebi.modeler.ModelerException: java.lang.NullPointerException
at org.pentaho.agilebi.spoon.XulUI.<init>(XulUI.java:76)
at org.pentaho.agilebi.spoon.perspective.AgileBiModelerPerspective.createTabForModel(AgileBiModelerPerspective.java:122)
at org.pentaho.agilebi.spoon.ModelerHelper.createEmptyModel(ModelerHelper.java:660)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329)
at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:139)