Skip to content

Instantly share code, notes, and snippets.

@datadavev
datadavev / h3_cells_visible.js
Last active December 17, 2025 17:43
H3 cells in Cesium view
import * as Cesium from "cesium";
import * as h3 from "https://cdnjs.cloudflare.com/ajax/libs/h3-js/4.3.0/h3-js.es.min.js";
/**************************************************************************************************
* "Patch" for Cesium camera computeViewRectangle.
*
* This path provides a modified implementation of computeViewRectangle that
* returns the correct view rectangle when the camera is oriented towards the south
* and the horizon is visible. The default implementation truncates the view rectangle
* at a lower corner of the view which can significantly reduce the reported view
@datadavev
datadavev / h3_cells.js
Last active December 17, 2025 15:16
Show Level 1 H3 Cells on Cesium
// Drop this into https://sandcastle.cesium.com/
import * as Cesium from "cesium";
import * as h3 from "https://cdnjs.cloudflare.com/ajax/libs/h3-js/4.3.0/h3-js.es.min.js";
const someColors = [
Cesium.Color.GOLD,
Cesium.Color.AQUA,
Cesium.Color.BLUEVIOLET,
Cesium.Color.CHARTREUSE,
Cesium.Color.CORAL,
@datadavev
datadavev / rev1_soso_common_v1.2.3.ttl
Last active October 27, 2025 15:14
Tweaking the SOSO shapes
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix SO: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix soso: <http://science-on-schema.org/1.2.3/validation/shacl#> .
@prefix datacite: <http://purl.org/spar/datacite/> .
@datadavev
datadavev / test.html
Created September 8, 2025 19:44
Test HTML
<html>
<head>
<title>Hello HTML</title>
</head>
<body>
<p>Hello HTML</p>
</body>
</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6,7c6,7
< const DUCKDB_WASM_VERSION = "1.29.0";
< const DUCKDB_VERSION = "1.1.1";
---
> const DUCKDB_WASM_VERSION = "1.29.1-dev269.0";
> const DUCKDB_VERSION = "1.3.2";
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Setting up Python on OS X

Works for me.

Install homebrew

brew install coreutils
brew install direnv
brew install uv
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@datadavev
datadavev / list_packages
Created January 29, 2025 15:07
List of dataone managed packages on a CN
export CN="${CN:=cn-ucsb-1.dataone.org}"
ssh ${CN} 'for PKG in $(apt list --installed | grep dataone | cut -d "/" -f 1); do echo "package,file_name"; for FN in $(dpkg -L $PKG); do echo "${PKG},${FN}"; done; done' | gh gist create -p -f dataone_packages.csv -d "cn-ucsb-1 package list $(date -I). Created with 'https://gist.github.com/datadavev/df83ce3a324f858afa9a408c047b9489'"