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
{
"bitwise": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"newcap": true,
"esnext": true,
"latedef": true,
"noarg": true,
"node": true,
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]',

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

git fetch --all
git reset --hard origin/master
git pull origin master
/**
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript
* https://gist.github.com/faisalman
*
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com>
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
*/
(function(){
@brenopolanski
brenopolanski / index.html
Created October 5, 2015 02:07 — forked from fourcolors/index.html
ReactJS with jQuery Dialog // source http://jsbin.com/zunud/4
<!DOCTYPE html>
<html>
<head>
<link href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script>
<script src="http://fb.me/react-0.3.0.js"></script>
<script src="http://fb.me/JSXTransformer-0.3.0.js"></script>
<meta charset="utf-8">
@brenopolanski
brenopolanski / structure-css
Created October 7, 2015 01:20 — forked from dancasttro/structure-css
Structure of my files preprocessors(Stylus/Sass) for projects
.
├── base
│ ├── config.styl
│ ├── mixins.styl
│ ├── helpers.styl
│ └── grid.styl
├── core
│ ├── reset.styl
│ ├── forms.styl
│ ├── tables.styl
@brenopolanski
brenopolanski / window.location.origin.js
Created November 2, 2015 18:16
window.location.origin IE fix
if (!window.location.origin) { // Some browsers (mainly IE) does not have this property, so we need to build it manually...
window.location.origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? (':' + window.location.port) : '');
}
var origin = function () {
// IE10 Doesn't have window.location.origin :(
if (!window.location.origin) {
var port = window.location.port ? ':' + window.location.port : '';
return window.location.protocol + "//" + window.location.hostname + port;
} else {
return window.location.origin;
}
}
@brenopolanski
brenopolanski / git-update-fork.sh
Created December 23, 2015 21:20 — forked from rdeavila/git-update-fork.sh
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream