Skip to content

Instantly share code, notes, and snippets.

View Purush0th's full-sized avatar

Purushothaman Anbazhagan Purush0th

View GitHub Profile
@Purush0th
Purush0th / api.js
Created December 26, 2023 17:25
Superset Guest Token Generation - Node.js
var express = require('express');
const axios = require('axios');
var https = require('https');
var router = express.Router();
var supersetBaseUrl = 'http://localhost:8088/api/v1';
const httpsAgent = new https.Agent({
rejectUnauthorized: false,
})
axios.defaults.httpsAgent = httpsAgent
@Purush0th
Purush0th / run_superset.sh
Created December 26, 2023 13:50
superset Run Script
#!/bin/bash
source /home/falcon/superset-venv/bin/activate
export FLASK_APP=superset
export SUPERSET_CONFIG_PATH=/home/falcon/app/superset_config.py
superset run -p 8088 --with-threads --reload --debugger
deactivate
@Purush0th
Purush0th / superset_appembed_role.txt
Created December 26, 2023 13:48
Role AppEmbed - Permissions
[can read on Chart, can read on Dashboard, can list on DynamicPlugin, can read on Explore, can samples on Datasource, can explore json on Superset, can get embedded on Dashboard, can read on Dataset, all datasource access on all_datasource_access, all database access on all_database_access, can explore on Superset]
@Purush0th
Purush0th / superset_config.py
Created December 26, 2023 13:46
Superset Config With Embed SDK enabled
# Superset specific config
ROW_LIMIT = 5000
# Flask App Builder configuration
# Your App secret key will be used for securely signing the session cookie
# and encrypting sensitive information on the database
# Make sure you are changing this key for your deployment with a strong key.
# Alternatively you can set it with `SUPERSET_SECRET_KEY` environment variable.
# You MUST set this for production environments or the server will not refuse
# to start and you will see an error in the logs accordingly.
@Purush0th
Purush0th / jspdf.plugin.text-align.js
Last active November 23, 2020 18:47
Text alignment for jsPDF 💥
(function (api, $) {
'use strict';
api.writeText = function (x, y, text, options) {
options = options || {};
var defaults = {
align: 'left',
width: this.internal.pageSize.width
}
@Purush0th
Purush0th / box-sizing-reset-bootstrap3.css
Last active August 29, 2015 14:20
Fix for Box Sizing resets while using bootstrap in exisitng project. Use class "col" with bootstrap column class to take effect of box-sizing.
/*#region box-sizing fix*/
*,
*:before,
*:after {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.container-fluid .row .col,