Skip to content

Instantly share code, notes, and snippets.

@johnjameswhitman
johnjameswhitman / Gemfile
Created July 29, 2014 21:47
Spree Gemfile
if RUBY_VERSION =~ /1.9/ # assuming you're running Ruby ~1.9
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
end
if Time.now.getlocal.utc_offset / 3600 == 8 # China Standard Time
source 'http://ruby.taobao.org'
else
source 'https://rubygems.org'
end
@johnjameswhitman
johnjameswhitman / Gemfile.lock
Created July 29, 2014 21:50
Spree Gemfile.lock
GIT
remote: git://github.com/200Creative/spree_bootstrap_frontend.git
revision: b438fee221aea44d4389b219c9da4c0a3ce8ae58
branch: 2-2-stable
specs:
spree_bootstrap_frontend (2.2.0)
bootstrap-kaminari-views (~> 0.0.3)
bootstrap-sass (~> 3.1.0)
spree_core (~> 2.2.0)
@johnjameswhitman
johnjameswhitman / README_SUPERSET_OKTA.md
Last active May 9, 2023 15:36
Apache Superset Okta Config for local docker-compose demo

A few notes to get this working:

  • Need to have an Okta tenant, with an OIDC+web app
  • Must allow Superset to see all of a user's groups by editing the Okta-app's Groups Claim Filter to be Matches regex .* (Okta docs)
  • Check out apache/superset/ locally
  • Add the following values from your Okta tenant / app to docker/.env-non-dev (Superset docker docs)
    • OKTA_DOMAIN (e.g. dev-{your_id}.okta.com)
    • OKTA_CLIENT_ID (from your OIDC app's config)
    • OKTA_CLIENT_SECRET (from your OIDC app's config)
  • Add the below snippet to docker/pythonpath_dev/superset_config_docker.py
  • Note: This is based on the FlaskAppBuilder docs and [this other gist](https://gist.github.com/ktmud/2475282a166893e5d1
@johnjameswhitman
johnjameswhitman / docker-compose.yml
Last active August 28, 2023 19:30
Django ticket #34799 MySQL setup
version: '3'
services:
django-mysql:
image: mysql:8
container_name: django-mysql
ports:
- 43306:3306
env_file:
- local.env
@johnjameswhitman
johnjameswhitman / endurance.py
Last active November 9, 2023 14:37
Machine Benchmarks
"""Endurance test the battery while watching video.
Videos to use (first two matter for OLED displays)...
- [white background video](https://www.youtube.com/watch?v=J3pF2jkQ4vc),
- [black background video](https://www.youtube.com/watch?v=XIMLoLxmTDw), and
- [nature video](https://www.youtube.com/watch?v=k-ZXEDMEaew)
"""
import logging
import time