Skip to content

Instantly share code, notes, and snippets.

View brenopolanski's full-sized avatar
🦙
Llama Llama

Breno Polanski brenopolanski

🦙
Llama Llama
View GitHub Profile
@brenopolanski
brenopolanski / truncate-string.md
Last active August 29, 2015 14:06
Truncate String with Ellipsis

via: css-tricks

.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@brenopolanski
brenopolanski / bower-install-https.md
Created October 2, 2014 16:28
Bower install using only https
@brenopolanski
brenopolanski / update-time_by_day-year.md
Last active August 29, 2015 14:09
Update time_by_day year

on your local install go to http://localhost:8080/saiku/console

jdbc:h2:../../data/foodmart add that as a jdbc url and then run:

  • update "time_by_day" set "the_year" = 2014 where "the_year" = 1997;
  • update "time_by_day" set "the_year" = 2015 where "the_year" = 1998;
@brenopolanski
brenopolanski / mdx-days.md
Last active August 29, 2015 14:09
MDX Dates

Equals

Filter([Time].[Weekly].[Day].members, [Time].[Weekly].[Day].CurrentMember.Properties("date_string") = '1997/02/01')

After

Filter([Time].[Weekly].[Day].members, [Time].[Weekly].[Day].CurrentMember.Properties("date_string") > '1997/02/01')

Before

var test = function () {
SaikuUtils.create('http://localhost:8080/pentaho/plugin/saiku/api/').execute({
username: 'admin',
queryname: 'test123',
cube: {
schemaName: 'SteelWheels',
name: 'SteelWheelsSales',
},
mdx: 'SELECT NON EMPTY {Hierarchize({[Measures].[Quantity]})} ON COLUMNS, NON EMPTY {Hierarchize({[Product].[Product].Members})} ON ROWS FROM [SteelWheelsSales]',
@brenopolanski
brenopolanski / xbox360-erro-mtu.md
Last active August 29, 2015 14:11
X360 + GVT + D-Link DSL-2640B (erro MTU)

Add IP estático para o XBOX 360 e adicionar o endereço no DMZ Host.

Advanced Setup -> NAT -> DMZ Host -> DMZ Host IP Address

Depois reiniciar o router ✌️

@brenopolanski
brenopolanski / how-to-clone-models-in-backbone.md
Last active August 29, 2015 14:13
How to Clone Models in Backbone

via: stackoverflow

You could use the clone method. Short example below:

var Model = Backbone.Model.extend({});
var View = Backbone.View.extend({
    initialize: function() {
        this.realModel = this.model;
 this.model = this.realModel.clone();
@brenopolanski
brenopolanski / check-url-parameters-saiku.md
Created January 12, 2015 13:43
Check URL parameters in Saiku
@brenopolanski
brenopolanski / FoodMart4.xml
Created January 14, 2015 13:34
FoodMart 4
<?xml version='1.0'?>
<Schema name='FoodMart' metamodelVersion='4.0'>
<!--
== This software is subject to the terms of the Eclipse Public License v1.0
== Agreement, available at the following URL:
== http://www.eclipse.org/legal/epl-v10.html.
== You must accept the terms of that agreement to use this software.
==
== Copyright (C) 2000-2005 Julian Hyde
== Copyright (C) 2005-2013 Pentaho and others
@brenopolanski
brenopolanski / jquery.outerhtml.js
Created January 21, 2015 18:52
A jQuery plugin to retrieve the outerHTML of an element
/*! Copyright (c) 2006 Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
*/
(function($){
var div;
$.fn.outerHTML = function() {
var elem = this[0],