Skip to content

Instantly share code, notes, and snippets.

@ewheeler
ewheeler / gist:cd96f46aa07517be400825b5be7cefd6
Created April 14, 2023 18:40
superset-dashboard-cloner exception
Creating empty dashboard 'RapidPro 2022 messages' from 'RapidPro 2021 messages'...
send: b'POST /api/v1/security/login HTTP/1.1\r\nHost: localhost:8088\r\nUser-Agent: python-requests/2.28.1\r\nAccept-Encoding: gzip, deflate, br\r\nAccept: */*\r\nConnection: keep-alive\r\nContent-Length: 86\r\nContent-Type: application/json\r\n\r\n'
send: b'{"username": "zzz", "password": "xxx", "provider": "db", "refresh": false}'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server: gunicorn
header: Date: Fri, 14 Apr 2023 18:17:10 GMT
header: Connection: keep-alive
header: Content-Type: application/json; charset=utf-8
header: Content-Length: 287
header: Set-Cookie: session=8b8af0a2-e2dc-42ae-bdd5-fb78f91b82ec; Expires=Mon, 15-May-2023 18:17:10 GMT; HttpOnly; Path=/; SameSite=Lax
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ewheeler
ewheeler / run-in-screen.sh
Created July 21, 2017 19:49
run redash services in a tabbed screen session
screen -AdmS redash
screen -S redash -X screen -t flask bin/run ./manage.py runserver --debugger --reload
screen -S redash -X screen -t celery ./bin/run celery worker --app=redash.worker --beat -Qscheduled_queries,queries,celery -c2
screen -S redash -X screen -t client npm run start
---
action_point:
PersonResponsible:
status:
edit: true
view: true
due_date:
edit: false
view: true
description:

Keybase proof

I hereby claim:

  • I am ewheeler on github.
  • I am evmw (https://keybase.io/evmw) on keybase.
  • I have a public key ASBLPnLx7emRelngbk8fppavGyg0HV_O1-Zs1LzGNMNgZwo

To claim this, I am signing this object:

@ewheeler
ewheeler / overpass-turbo-admin-boundaries-query.js
Last active October 4, 2023 01:27
Overpass-Turbo query for viewing administrative boundaries
/*
This is an example Overpass query to view administrative boundaries.
1. Visit the OpenStreetMaps wiki (http://wiki.openstreetmap.org/wiki/Tag:boundary%3Dadministrative) and see which levels are present for your country. If admin_level = N/A, that level is missing.
2. Go to http://overpass-turbo.eu and centre the map on the country of interest.
3. Delete the text on the left side of the overpass-turbo page and replace with the contents of this file
4. Edit the admin_level to the level you want to check - in the example above, the "admin_level" = "8". Press 'Run' to highlight and outline all boundaries for that level.
@ewheeler
ewheeler / d3.min.js
Last active August 29, 2015 14:21
Nepal Districts and VDCs
d3=function(){function t(t){return t.target}function n(t){return t.source}function e(t,n){try{for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}catch(r){t.prototype=n}}function r(t){for(var n=-1,e=t.length,r=[];e>++n;)r.push(t[n]);return r}function u(t){return Array.prototype.slice.call(t)}function i(){}function a(t){return t}function o(){return!0}function c(t){return"function"==typeof t?t:function(){return t}}function l(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function f(t){return null!=t&&!isNaN(t)}function s(t){return t.length}function h(t){return t.trim().replace(/\s+/g," ")}function g(t){for(var n=1;t*n%1;)n*=10;return n}function p(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function d(t){return t.responseText}function m(t){return JSON.parse(t.responseText)}function v(t){var n=Li.createRange();return n.selectNode(Li.body),n.createContextualFragment(t.responseText)}function y(t){return t.responseXML}function M(){}function b(t){functio
@ewheeler
ewheeler / .gitignore
Last active February 7, 2024 06:11
timezone map
.DS_Store
build
node_modules
@ewheeler
ewheeler / .conkyrc
Created February 26, 2014 11:05
.conkyrc for classmate netbooks
background no
cpu_avg_samples 2
net_avg_samples 2
out_to_console no
# X font when Xft is disabled, you can pick one with program xfontsel
#font 7x12
#font 6x10
@ewheeler
ewheeler / d3.min.js
Last active August 29, 2015 13:56
uganda regions, districts, and parishes
d3=function(){function t(t){return t.target}function n(t){return t.source}function e(t,n){try{for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}catch(r){t.prototype=n}}function r(t){for(var n=-1,e=t.length,r=[];e>++n;)r.push(t[n]);return r}function u(t){return Array.prototype.slice.call(t)}function i(){}function a(t){return t}function o(){return!0}function c(t){return"function"==typeof t?t:function(){return t}}function l(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function f(t){return null!=t&&!isNaN(t)}function s(t){return t.length}function h(t){return t.trim().replace(/\s+/g," ")}function g(t){for(var n=1;t*n%1;)n*=10;return n}function p(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function d(t){return t.responseText}function m(t){return JSON.parse(t.responseText)}function v(t){var n=Li.createRange();return n.selectNode(Li.body),n.createContextualFragment(t.responseText)}function y(t){return t.responseXML}function M(){}function b(t){functio