Skip to content

Instantly share code, notes, and snippets.

View nutjob4life's full-sized avatar
💭
Contemplating next hair color

Sean Kelly nutjob4life

💭
Contemplating next hair color
View GitHub Profile
@nutjob4life
nutjob4life / nuke.sh
Created October 13, 2023 15:07
Legacy sanity check: nuke everything and rebuild from scratch
mkdir -p /tmp/legacy/data /tmp/legacy/solrdocs /tmp/legacy/src
cd /tmp/legacy/src
git clone --quiet git@github.com:NASA-PDS/ds-view.git
git clone --quiet git@github.com:NASA-PDS/registry-harvest-legacy.git
git clone --quiet git@github.com:NASA-PDS/registry-mgr-legacy.git
git clone --quiet git@github.com:NASA-PDS/search-ui-legacy.git
# Omitting registry-pds3-catalog since it's not building right now
# git clone --quiet git@github.com:NASA-PDS/registry-pds3-catalog.git
for repo in *; do
cd $repo
@nutjob4life
nutjob4life / extract.py
Created June 14, 2023 16:47
Extract abstracts for EDRN's publications
# encoding: utf-8
'''Extract abstracts used by EDRN publications.
To use::
python3.10 -m venv .venv
.venv/bin/pip install --quiet --upgrade setuptools pip wheel build
.venv/bin/pip install biopython~=1.81 rdflib~=6.3.2
.venv/bin/python extract.py > all-abstracts.txt
@nutjob4life
nutjob4life / maven.log
Created November 3, 2022 20:29
pds4-jparser failing to build
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for gov.nasa.pds:pds4-jparser:jar:2.3.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 75, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 136, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
@nutjob4life
nutjob4life / ka-crispy-cheesy-pan-pizza.md
Created October 29, 2022 17:36
King Arthur Baking's Crispy Cheese Pan Pizza

Pizza Hut, go home. There's no more place for you here! Because THIS is the most insanely delicious pan pizza out there, and it's super easy.

Growing up in Colorado I had pretty limited exposure to the world of pizza. I remember when Pizza Hut first introduced pan pizza in 1980. My family would go to the local Hut with its distinctive roof and we'd get a large pan pizza and a few salad bar trips to share. (Remember the salad bar? Remember those red plastic cups you'd fill yourself, mixing one of every soda from the fountain?)

The crusts on those pizzas were the best part, of course: thick and pillowy, with a crisp edge and bottom. It was a study in contrasts: you'd get that crackly crispness that rapidly yielded to the yeasty, fluffy interior. Sadly, nostalgia probably makes the Hut's pan pizzas taste better than they really were.

And that's just fine, because this recipe lets you make a superior product with your own high grade King Arthur flour, SAF yeast, and premium extra virgin olive oil. This crust i

@nutjob4life
nutjob4life / ka-boston-cream-pie.md
Created October 26, 2022 23:07
King Arthur Baking's Boston Cream "Pie"

I'm not much of a baker but from time to time I'll explore an interesting challenge, and having recalled fondly "Boston Cream Pie" donuts and eclairs from the past, I thought I'd try the actual cake to see what the hubbub was all about.

And it is indeed a cake! Not a pie! I'm not sure why people in Boston can't seem to comprehend what is intuitively obvious even to the most casual of observers. There are two layers of sponge, a middle layer of pastry cream, an icing, and absolutely zero crust. This is cake! Although I guess we can forgive them, since we also call cheesecake cake, even though it really is a custard pie. Makes you think, doesn't it?

In any case, I followed King Arthur's instructions to an exacting and meticulous degree—partially because I am indeed quite pedantic in everyday life, but also because I'm not a confident baker. And I have to say: this is an INCREDIBLE recipe. The results were nothing short of terrific: the sponges were both sweet but not cloying, and had a moist and pleasant mo

@nutjob4life
nutjob4life / ka-bolo-bao.md
Created October 26, 2022 23:02
Review: King Arthur Baking Company's "Bolo Bao" (Pineapple Buns)

As I've mentioned in my past reviews, I'm not an experienced baker. And so when it comes to following instructions and being extremely detail-oriented, I trust the recipes on King Arthur's site to do the right thing and help me along the way. Pedants rejoice!

And so I have to say I'm "above average happy" with the way these Bolo Bao turned out—not perfectly happy, just "above average".

I've never tried the craquelin or concha technique before despite having seen it in episodes of GBBO or in the pages of "Cook's Illustrated", but when this appeared as the "bake of the week" on King Arthur I thought "Why not?" With a mise en place measured out to exacting degrees (using a digital scale that can even do tenths of grams) and my recently-calibrated oven, I dove in. (Not into the oven, the recipe.)

The topping came together nicely and the log went into the fridge to chill. The custard still didn't get to the right consistency even after four minutes of constant whisking so I did cheat and added a half a table

@nutjob4life
nutjob4life / conundrum.md
Created September 28, 2022 16:02
The Swagger/Javadoc conundrum

Okay folks, I've been digging deeper into this problem this morning. The crux of the issue is that swagger-codegen-maven-plugin generates its sources in target/generated-sources/src and when the "site" phase runs to create the repositories website (including the javadocs), those sources are considered part of the set that are candidates for inclusion in the javadocs.

However, using <excludePackageNames> is of no help. For one,

target.generated-sources.swagger.src.gen.java.main.*

is invalid because a package name cannot contain a hyphen. Try it! Make this source file:

import target.generated-sources.whatever;
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
export PATH=${JAVA_HOME}/bin:${PATH}
cd /tmp
git clone https://github.com/nasa-pds-engineering-node/exemplar.git
cd exemplar
git checkout 4844ed8f4eeb1c30646e8662bbc91ad7d2683750
egrep maven-javadoc-plugin pom.xml
# Note: no javadoc plugin
mvn install
ls target/*.jar
@nutjob4life
nutjob4life / Makefile
Created March 22, 2022 21:15
"pandoc" demonstration
SOURCE = Uploading-Data-to-LabCAS.md
TARGETS = sftp.docx sftp.html sftp.pdf sftp.textile
all: $(TARGETS)
sftp.docx: $(SOURCE)
pandoc --from=markdown --to=docx --output=sftp.docx $(SOURCE)
sftp.html: $(SOURCE)
pandoc --standalone --from=markdown --to=html --output=sftp.html $(SOURCE)
@nutjob4life
nutjob4life / show-statements.py
Created February 18, 2022 18:25
Show the statements made by some RDF
# encoding: utf-8
#
# show-statements.py — print some RDF
#
# To use this:
#
# python3 -m venv venv
# venv/bin/pip install --quiet --upgrade pip setuptools rdflib
# venv/bin/python show-statements.py URL