Skip to content

Instantly share code, notes, and snippets.

View sfirke's full-sized avatar

Sam Firke sfirke

  • City of Ann Arbor
  • Ann Arbor, MI
  • 03:45 (UTC -05:00)
View GitHub Profile
@byk0t
byk0t / solution.md
Last active June 19, 2024 16:18
Apache Superset permissions for Public role, manually or through cli
  1. You can add these permissions through superset ui.
  2. Or you can import them from the json file using superset cli: superset fab import-roles -p superset-public-permissions.json
  3. Tested with iframes in versions 1.3 and 1.5

  • can_read on DashboardFilterStateRestApi|
  • can_read on Dataset
  • can_read on Dashboard
  • can_read on CssTemplate
  • can_read on SavedQuery
@d9k
d9k / superset_config_docker.py
Created January 13, 2022 07:44
Superset welcome page redirect
import logging
import pprint
from flask import Flask, redirect
from flask_appbuilder import expose, IndexView
from superset.typing import FlaskResponse
logger = logging.getLogger()
@scottpdawson
scottpdawson / strava.js
Last active October 31, 2024 14:54
Bulk download Strava activities
var maxPage = 25; // calculate this using (activities/20 + 1)
var activityType = "Run"; // change to the workout type you want, or blank for all
var p = 1;
var done = 0;
var url;
var nw = window.open("workouts.html");
nw.document.write("[");
while (p <= maxPage) {
url = "https://www.strava.com/athlete/training_activities" +
"?keywords=&activity_type=" + activityType + "&workout_type=&commute=&private_activities=" +
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active November 14, 2024 18:54
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@morrismukiri
morrismukiri / superset-admin-password-reset.sh
Created January 17, 2019 17:11
Apache Superset reset admin password
# activate the virtualenv
source /home/superset/.virtualenvs/superset/bin/activate
fabmanager reset-password --app superset --username admin --password enteryournewpassword