Skip to content

Instantly share code, notes, and snippets.

View rmoff's full-sized avatar
:shipit:
Shitposting and Memes

Robin Moffatt rmoff

:shipit:
Shitposting and Memes
View GitHub Profile
@rmoff
rmoff / gist:62c5ac4056c0c97f31e7
Created April 15, 2015 10:54
OBIEE system presentation variables
(Paste this into a Static Text view in OBIEE to see the current values)
[u][b]Predefined Presentation Variables
[/b][/u][br/]
<p align="left">
[b]dashboard.currentPage:[/b] @{dashboard.currentPage}[br/]
[b]dashboard.author:[/b] @{dashboard.author}[br/]
[b]dashboard.caption:[/b] @{dashboard.caption}[br/]
[b]dashboard.description:[/b] @{dashboard.description}[br/]
[b]dashboard.location:[/b] @{dashboard.location}[br/]
@rmoff
rmoff / twitter-logstash_auth_note.txt
Created May 7, 2015 18:14
Logstash twitter plugin fails with Twitter::Error::Unauthorized even when creds are good
This can be caused when the date/time on the machine running logstash is wrong.
@rmoff
rmoff / ELK-articles.txt
Created May 11, 2015 13:43
Blog posts about ELK (Elasticsearch, Logstash, and Kibana)
[http://ritt.md/go-elk-1](http://ritt.md/go-elk-1)
http://ritt.md/go-elk-2
http://ritt.md/go-elk-3
@rmoff
rmoff / gist:cd158282f620a4fa4d4b
Created June 16, 2015 12:51
Kibana won't show geoip field in dropdown - solution

For Kibana to create a Tile map it needs geo-encoded data, which logstash does easily with the geoid plugin, BUT the field mapping in Elasticsearch must be geopoint. Logstash does this dynamically so long as the index being written to matches the elasticsearch-template.json template, which is any prefixed with logstash. Otherwise, you need to update the index field mapping yourself for this to work.

@rmoff
rmoff / gist:cadd24cd3b1bf44357b2
Created June 25, 2015 12:45
distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation
[oracle@obi11-01 instantclient_12_1]$ sudo pip install cx_Oracle
Downloading/unpacking cx-Oracle
  Running setup.py egg_info for package cx-Oracle
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build-root/cx-Oracle/setup.py", line 170, in <module>
        raise DistutilsSetupError("cannot locate an Oracle software " \
    distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation
    Complete output from command python setup.py egg_info:

Traceback (most recent call last):

@rmoff
rmoff / roracle.clob.md
Created July 21, 2015 16:17
Error in .valueClassTest(ans, "data.frame", "fetch") : invalid value from generic function 'fetch', class "try-error", expected "data.frame"

Error from ROracle when running fetch(query):

Error in .valueClassTest(ans, "data.frame", "fetch") : 
  invalid value from generic function 'fetch', class "try-error", expected "data.frame"

Cause: a CLOB in the data being returned (SELECT * - lazy!). Fix: Didn't need the CLOB anyway so dropped it from the query.

@rmoff
rmoff / 00.README.md
Last active December 1, 2021 23:45
RMarkdown - repeating child block with changing variable value

When you use knit_expand it appears that the inclusion of the Rmd is done on the first pass, and then the complete document evaluated. This means that a Rmd block referenced in loop with knit_expand will only evaluate changing variables at their last value.

This can be worked around by passing the literal value of the variable at the time of the knit_expand with {{var}} syntax.

This is documented in the knitr_expand docs, but less clear (to an R noob like me) for embedded documents rather than strings.

@rmoff
rmoff / gist:7fc55dca01a14acb2566
Created August 18, 2015 14:20
OBIEE RPD version numbers
RPD versions change with releases of OBIEE:
349 = 11.1.1.9.0
326 = 11.1.1.7.1
325 = 11.1.1.7.0
318 = 11.1.1.6
308 = 11.1.1.5
Use `nqgenoldverrpd.exe` to downgrade an RPD file's version.
@rmoff
rmoff / README.md
Created August 19, 2015 10:00
OBIEE executeXMLQuery web service example
@rmoff
rmoff / obiee-reload-metadata.py
Created August 28, 2015 11:16
Reload OBIEE Metadata programatically
# Variables
SAW_PROTO='http'
SAW_SERVER='myobieeserver.foo.com'
SAW_PORT=7780
BI_USER='Prodney'
BI_PW='Admin123'
# Libraries
import requests, re
try: