Skip to content

Instantly share code, notes, and snippets.

Avatar

Aidan Lister aidanlister

View GitHub Profile
@aidanlister
aidanlister / bi-dashboard.js
Created Sep 13, 2020
A react component for embedding sisense where you have a tenant-per-subdomain multitenancy architecture
View bi-dashboard.js
import React, { useRef } from 'react'
import PropTypes from 'prop-types'
const BI_BASE_URL = 'https://sisense.onuptick.com'
const BIDashboard = ({ defaultDashboard, jwt }) => {
// This component creates an iframe element setting the initial src to log the user in via a JWT
// once that load has finished, the onLoad handler is called (loadDashboard). This then
// hands over to the SiSense API to initialise the iframe and complete the embedding.
const src = BI_BASE_URL + '/jwt?jwt=' + jwt
const iFrameElement = useRef(null)
@aidanlister
aidanlister / bi-dashboard.js
Created Sep 13, 2020
A react component for embedding SiSense
View bi-dashboard.js
import React, { useRef } from 'react'
import PropTypes from 'prop-types'
const BI_BASE_URL = 'https://sisense.onuptick.com'
const BIDashboard = ({ defaultDashboard, jwt }) => {
// This component creates an iframe element setting the initial src to log the user in via a JWT
// once that load has finished, the onLoad handler is called (loadDashboard). This then
// hands over to the SiSense API to initialise the iframe and complete the embedding.
const src = BI_BASE_URL + '/jwt?jwt=' + jwt
const iFrameElement = useRef(null)
@aidanlister
aidanlister / 0_reuse_code.js
Created Jun 3, 2017
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View jquery.stickytabs.js
/**
* jQuery Plugin: Sticky Tabs
*
* @author Aidan Lister <aidan@php.net>
* @version 1.2.0
*/
(function ( $ ) {
$.fn.stickyTabs = function( options ) {
var context = this